Eli Friedman
271002fc99
Support dllimport and dllexport on x86-64 Windows. PR10978. Patch by Ruben Van Boxem.
...
llvm-svn: 140871
2011-09-30 18:53:25 +00:00
Fariborz Jahanian
0c78427d50
objc gc: assigning to an objc object struct member through an ivar
...
pointer to this struct must go through the none ivar writer barrier.
llvm-svn: 140867
2011-09-30 18:23:36 +00:00
Eli Friedman
1b87b29bfd
Minor cleanup.
...
llvm-svn: 140866
2011-09-30 18:19:16 +00:00
Argyrios Kyrtzidis
12afd70370
[libclang] Introduce CXCursor_CXXAccessSpecifier for C++'s public:/private:/protected: specifiers.
...
Patch by Paolo Capriotti!
llvm-svn: 140864
2011-09-30 17:58:23 +00:00
David Chisnall
3154e68bef
Remove the conditional that avoided passing the Objective-C runtime specification flags to cc1. This fixes PR10369 (__builtin_NSStringMakeConstantString() selecting the wrong runtime in C / C++ code and crashing, although it doesn't fix the problem that instantiating the Mac runtime for non-Darwin targets was crashing.)
...
llvm-svn: 140853
2011-09-30 13:32:35 +00:00
Sebastian Redl
0d16401228
Fix a bug in the token caching for inline constructors in C++11, and improve error recovery in both dialects. This should fix the GCC test suite failures as well.
...
llvm-svn: 140847
2011-09-30 08:32:17 +00:00
John McCall
32f5fe1467
Add explicit attributes to mark functions as having had their
...
CoreFoundation object-transfer properties audited, and add a #pragma
to cause them to be automatically applied to functions in a particular
span of code. This has to be implemented largely in the preprocessor
because of the requirement that the region be entirely contained in
a single file; that's hard to impose from the parser without registering
for a ton of callbacks.
llvm-svn: 140846
2011-09-30 05:12:12 +00:00
Ted Kremenek
afedc07a9b
Fix crash when analyzing C++ code involving constant enums and switch statements (<rdar://problem/10202899>).
...
llvm-svn: 140844
2011-09-30 03:51:54 +00:00
Anna Zaks
819b0d8619
[analyzer] Fix a bug in RetainReleaseChecker diagnostics. It gives more precise error message on the modified test case (and prevents duplicate diagnostics when we purge at block granularity).
...
llvm-svn: 140840
2011-09-30 02:19:19 +00:00
Anna Zaks
8d4c8e1498
[analyzer] Add -analyzer-purge option which can take on multiple values, remove -analyzer-purge=none. (Small refactor as well: move the work of constructing AnalysisManager from the callers to the class itself.)
...
llvm-svn: 140838
2011-09-30 02:03:00 +00:00
Eli Friedman
a4b02c30de
Some fixes for MS-style asm parsing: specifically, add some error checking, and handle asm comments using semicolons correctly. (The comments are actually surprisingly tricky.)
...
llvm-svn: 140837
2011-09-30 01:13:51 +00:00
Richard Smith
7cd25b2836
constexpr functions are implicitly const. More tests to follow.
...
llvm-svn: 140831
2011-09-30 00:45:47 +00:00
Richard Smith
befa6f0caa
Fix typo.
...
llvm-svn: 140829
2011-09-30 00:35:43 +00:00
Richard Smith
7b729cdbff
Suggest adding 'constexpr' if the GNU extension for in-class initializers for static const float members is used in C++11 mode.
...
llvm-svn: 140828
2011-09-30 00:33:19 +00:00
Richard Smith
256336d9ab
Mark the ExtWarn for in-class initialization of static const float members as a GNU extension. Don't extend the scope of this extension to all literal types in C++0x mode.
...
llvm-svn: 140820
2011-09-29 23:18:34 +00:00
Fariborz Jahanian
6b854c5d37
Minor refactoring. Enumerators may inherit the deprecated/unavailable
...
attributes from the enumeration type.
// rdar://10201690
llvm-svn: 140818
2011-09-29 22:45:21 +00:00
Eli Friedman
76d4e43063
PR11040: CheckICE should not allow an lvalue bitcast as part of an integer constant expression.
...
llvm-svn: 140812
2011-09-29 21:49:34 +00:00
Richard Smith
ee6311df69
In C++0x, static const volatile data members cannot be initialized in-class.
...
llvm-svn: 140809
2011-09-29 21:28:14 +00:00
Richard Smith
1a526fd96c
PR11000: Fix crash on invalid.
...
llvm-svn: 140802
2011-09-29 19:42:27 +00:00
Richard Smith
2316cd8b79
constexpr: semantic checking for constexpr variables.
...
We had an extension which allowed const static class members of floating-point type to have in-class initializers, 'as a C++0x extension'. However, C++0x does not allow this. The extension has been kept, and extended to all literal types in C++0x mode (with a fixit to add the 'constexpr' specifier).
llvm-svn: 140801
2011-09-29 19:11:37 +00:00
Fariborz Jahanian
d71061298c
c - Enumerators may inherit the deprecated/unavailable
...
attributes from the enumeration type.
// rdar://10201690
llvm-svn: 140800
2011-09-29 18:40:01 +00:00
Anna Zaks
196ebceb14
Add more comments to several checker callback functions.
...
llvm-svn: 140797
2011-09-29 18:08:22 +00:00
Peter Collingbourne
2f3cf4b158
Add support for alignment-specifiers in C1X and C++11, remove
...
support for the C++0x draft [[align]] attribute and add the C1X
standard header file stdalign.h
llvm-svn: 140796
2011-09-29 18:04:28 +00:00
Peter Collingbourne
4ce4de8ead
Add a warning group for warnings about using C1X features as extensions
...
llvm-svn: 140795
2011-09-29 18:04:12 +00:00
Peter Collingbourne
49eedecd70
Add support for parsing an attribute-specifier-seq containing multiple
...
attribute-specifiers
llvm-svn: 140794
2011-09-29 18:04:05 +00:00
Peter Collingbourne
70188b3fc2
Add support for parsing the optional attribute-specifier-seq at the
...
end of a decl-specifier-seq
llvm-svn: 140793
2011-09-29 18:03:57 +00:00
Peter Collingbourne
3e7644af27
Driver: use correct search paths for multilib
...
llvm-svn: 140782
2011-09-29 13:42:24 +00:00
John McCall
f1e8b34f6c
Add an ns_bridged attribute, used to specify that a
...
pointer to the annotated struct type can be used as an
Objective-C object pointer. If an argument is given, the
type is actually "toll-free bridged" to the specific type
named there, rather than just to 'id'.
For now, we cannot rely on all types being so annotated,
and we'll always have to have exceptions for things like
CFTypeRef (aka const void*), but this is clearly a good
foundation for improving toolage in this area.
llvm-svn: 140779
2011-09-29 07:17:38 +00:00
Ted Kremenek
7fd1723619
Like IBOutletCollection, it only makes sense to apply the IBOutlet annotation to Objective-C object types. Fixes <rdar://problem/10142685>.
...
llvm-svn: 140778
2011-09-29 07:02:25 +00:00
Ted Kremenek
6e302b2e6e
Do not warn about empty format strings when there are no data arguments. Fixes <rdar://problem/9473155>.
...
llvm-svn: 140777
2011-09-29 05:52:16 +00:00
David Blaikie
7833b7db1f
Unnecessary else
...
llvm-svn: 140775
2011-09-29 04:06:47 +00:00
Daniel Dunbar
866fcd34a6
Basic/Diagnostic: Kill off a few unnecessary functions now that refactoring is done, and add a note that the new setDiagnosticGroup{...} methods only operate on the current diagnostic state.
...
llvm-svn: 140771
2011-09-29 02:03:01 +00:00
Daniel Dunbar
58d0af6c5f
Basic/Diagnostics: Rewrite DiagnosticIDs::getDiagnosticLevel completely to be straighter line code, use the new DiagnosticMappingInfo flags, and eliminate the odd MAP_WARNING_NO_WERROR and friend mappings.
...
- This fixes a host of obscure bugs with regards to how warning mapping options composed with one another, and I believe makes the code substantially easier to read and reason about.
llvm-svn: 140770
2011-09-29 01:58:05 +00:00
Daniel Dunbar
fffcf21cf2
Basic/Diagnostics: Add three explicit bits to DiagnosticMappingInfo to track "no-warning-as-error", "no-error-as-fatal", and "show-in-system-header", and update DiagnosticsEngine::setDiagnosticGroup{WarningAsError,ErrorAsFatal} and GetDefaultDiagMappingInfo to set them appropriately.
...
- No actual functionality change for now, we still also use the diag::Mapping::{MAP_WARNING_NO_ERROR,MAP_ERROR_NO_FATAL,MAP_WARNING_SHOW_IN_SYSTEM_HEADER} for a little while longer.
llvm-svn: 140768
2011-09-29 01:52:06 +00:00
Daniel Dunbar
d908c12db8
Basic/Diagnostics: Add a DiagnosticIDs::getDiagnosticsInGroup method, and use
...
that in DiagnosticEngine instead of the convoluted calling into DiagnosticIDs
which then calls back into the DiagnosticsEngine.
llvm-svn: 140766
2011-09-29 01:47:16 +00:00
Daniel Dunbar
e8c12a2979
Basic/Diagnostic: Add a DiagSate::getOrAddMappingInfo method.
...
- Also, spell const_iterator as const_iterator.
llvm-svn: 140765
2011-09-29 01:42:25 +00:00
Daniel Dunbar
e9a700cba1
tests: Add some more tests for warning mappings.
...
llvm-svn: 140764
2011-09-29 01:37:40 +00:00
Daniel Dunbar
458edfa2b7
Basic/Diagnostics: Move setDiagnosticMapping() to using DiagnosticMappingInfo
...
and eliminate setDiagnosticMappingInternal.
llvm-svn: 140763
2011-09-29 01:34:47 +00:00
Daniel Dunbar
a3637e6894
Basic/Diagnostics: Add a DiagnosticMappingInfo helper class, and switch to
...
storing mappings with that instead of straying some magic constants about the
source.
llvm-svn: 140760
2011-09-29 01:30:00 +00:00
Daniel Dunbar
9c78496d51
Basic/Diagnostics: Eliminate getDiagnosticMappingInfo method, which wasn't worth methodizing.
...
llvm-svn: 140759
2011-09-29 01:25:14 +00:00
Daniel Dunbar
400e7e3b39
Basic/Diagnostic: Eliminate the extra "mapping" out-parameter now that I killed the sole client.
...
llvm-svn: 140756
2011-09-29 01:20:28 +00:00
Daniel Dunbar
aa11138543
Basic/Diagnostics: Add an isDefaultMappingAsError method, and switch TextDiagnosticPrinter to use that instead of extracting the current mapping via getDiagnosticLevel, which fixes one class of corner cases w.r.t. printing the "-Werror" diagnostic option marker.
...
- The TextDiagnosticPrinter code is still fragile as it is just "reverse engineering" what the diagnostic engine is doing. Not my current priority to fix though.
llvm-svn: 140752
2011-09-29 01:01:08 +00:00
Daniel Dunbar
e8d29472c5
Fix 80-col viola.
...
llvm-svn: 140749
2011-09-29 00:53:50 +00:00
Douglas Gregor
8fd12c58b1
Attempt to fix unit tests
...
llvm-svn: 140748
2011-09-29 00:53:49 +00:00
Daniel Dunbar
c2e5ca6e50
Basic/Diagnostic: Factor out
...
DiagnosticsEngine::setDiagnosticGroup{ErrorAsFatal,WarningAsError} methods which
more accurately model the correct API -- no internal change to the diagnostics
engine yet though.
- Also, stop honoring -Werror=everything (etc.) as a valid (but oddly behaved) option.
llvm-svn: 140747
2011-09-29 00:53:47 +00:00
Douglas Gregor
44e688d46a
Introduce an opt-in warning when a module is being implicitly built
...
from sources.
llvm-svn: 140746
2011-09-29 00:52:27 +00:00
Douglas Gregor
d0e9e3a6a5
Introduce a pure virtual clone() method to DiagnosticConsumer, so that
...
we have the ability to create a new, distict diagnostic consumer when
we go off and build a module. This avoids the currently horribleness
where the same diagnostic consumer sees diagnostics for multiple
translation units (and multiple SourceManagers!) causing all sorts of havok.
llvm-svn: 140743
2011-09-29 00:38:00 +00:00
Daniel Dunbar
6de48ee860
Basic/Diagnostics: Split out the default warning "no-Werror" and
...
"show-in-system-header" bits, which is part of teasing them apart from the
diagnostic mapping kind.
llvm-svn: 140742
2011-09-29 00:34:06 +00:00
Eric Christopher
2f45aaa755
Change "Regions" to be "LexicalBlocks" since that's what they
...
correspond to.
llvm-svn: 140740
2011-09-29 00:00:45 +00:00
Eric Christopher
bfa4dc5512
Rename EmitStopPoint in CGDebugInfo to EmitLocation. "stop points" don't
...
exist anymore.
llvm-svn: 140739
2011-09-29 00:00:41 +00:00