]>
granicus.if.org Git - clang/log
Argyrios Kyrtzidis [Thu, 1 Mar 2012 19:45:56 +0000 (19:45 +0000)]
Move llvm/ADT/SaveAndRestore.h -> llvm/Support/SaveAndRestore.h.
Needs llvm update.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151829
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jean-Daniel Dupas [Thu, 1 Mar 2012 17:45:53 +0000 (17:45 +0000)]
Merge __has_attribute tests. Patch by Jonathan Sauer!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151819
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 1 Mar 2012 16:34:31 +0000 (16:34 +0000)]
StmtProfiler: Add a null check for child statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151812
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jean-Daniel Dupas [Thu, 1 Mar 2012 14:53:16 +0000 (14:53 +0000)]
Implement double underscore names support in __has_attribute
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151809
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 1 Mar 2012 07:10:06 +0000 (07:10 +0000)]
Avoid examining the AST from the parser, and simplify somewhat.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151805
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 1 Mar 2012 06:49:39 +0000 (06:49 +0000)]
Revert r151800, which was committed without review and has correctness issues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151804
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 1 Mar 2012 04:55:54 +0000 (04:55 +0000)]
Fixing a buildbot complaint about nested templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151803
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 1 Mar 2012 04:18:49 +0000 (04:18 +0000)]
Implements support for #pragma include_alias in ms compatibility mode. Fixes PR10705.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151800
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 1 Mar 2012 04:09:28 +0000 (04:09 +0000)]
Added support for parsing declspecs on enumerations. Fixes PR8783
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151798
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 1 Mar 2012 04:01:32 +0000 (04:01 +0000)]
Implement "optimization" for lambda-to-block conversion which inlines the generated block literal for lambdas which are immediately converted to block pointer type. This simplifies the AST, avoids an unnecessary copy of the lambda and makes it much easier to avoid copying the result onto the heap.
Note that this transformation has a substantial semantic effect outside of ARC: it gives the converted lambda lifetime semantics similar to a block literal. With ARC, the effect is much less obvious because the lifetime of blocks is already managed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151797
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 1 Mar 2012 02:59:17 +0000 (02:59 +0000)]
Reject 'a = {0} = {0}' rather than parsing it as '(a = {0}) = {0}'. Also
improve the diagnostics for some attempts to use initializer lists in
expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151794
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 1 Mar 2012 02:12:07 +0000 (02:12 +0000)]
Correct an example of a feature name to actually use a feature name rather
than an attribute name. Patch by Michel Morin!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151791
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 1 Mar 2012 01:40:32 +0000 (01:40 +0000)]
Fix regression from llvm-gcc where we should NOT emit a warning about __attribute__((NSObject)) on a property declaration. This is needed to have retain properties for non-object pointers. Fixes <rdar://problem/
10930507 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151786
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Thu, 1 Mar 2012 01:30:58 +0000 (01:30 +0000)]
[analyzer] Diagnostics - do not try to cleanup the path with macros, it
will be done by the general cleanup later on.
A Patch by Ted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151784
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 1 Mar 2012 01:30:04 +0000 (01:30 +0000)]
Tighten type-checking a bit to make it clearer how BuildCXXMemberCallExpr is used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151783
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 1 Mar 2012 00:13:46 +0000 (00:13 +0000)]
Move suport for redefining operator keywords from -fms-extensions to -fms-compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151776
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 1 Mar 2012 00:05:06 +0000 (00:05 +0000)]
Change if...else if...else if... to a switch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151775
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Feb 2012 23:59:20 +0000 (23:59 +0000)]
[analyzer] when scanning FIDs in a PathDiagnostic, correctly recurse calls and macros.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151774
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 29 Feb 2012 22:54:43 +0000 (22:54 +0000)]
Allow operator keywords to be #defined in ms-ext mode.
Fixes PR10606.
I'm not sure if this is the best way to go about it, but
I locally enabled this code path without the msext conditional,
and all tests pass, except for test/Preprocessor/cxx_oper_keyword.cpp
which explicitly checks that operator keywords can't be redefined.
I also parsed chromium/win with a clang with and without this patch.
It introduced no new errors, but removes 43 existing errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151768
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 29 Feb 2012 22:21:36 +0000 (22:21 +0000)]
Test for my last patch. // rdar://
10267155 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151767
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 29 Feb 2012 22:18:55 +0000 (22:18 +0000)]
objective-c: provide fixit hint when atomic property does not
have matching user defined setter/getter and a warning is issued.
In this case, a fixit note is displayed. // rdar://
10267155
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151766
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 29 Feb 2012 20:59:56 +0000 (20:59 +0000)]
Fix a couple -Wuninitialized warnings from gcc. Reported by David Greene.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151754
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 29 Feb 2012 20:31:23 +0000 (20:31 +0000)]
Serialization: Switch over to using the native SmallVector based BitstreamWriter
ctor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151752
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 29 Feb 2012 20:18:57 +0000 (20:18 +0000)]
I referenced the incorrect rdar in my previous commit (r151745). Add the
correct radar number to the test case for tracking purposes.
rdar://
10551066
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151746
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 29 Feb 2012 20:14:59 +0000 (20:14 +0000)]
Allocate TargetLibraryInfo for the CodeGen passes. Otherwise, it's instantiated
by the BAA pass, which uses the default TargetLibraryInfo constructor.
Unfortunately, the default TargetLibraryInfo constructor assumes all library
calls are available and thus ignores -fno-builtin.
rdar://
10947759
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151745
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jason W Kim [Wed, 29 Feb 2012 19:12:10 +0000 (19:12 +0000)]
Reverting test commit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151739
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jason W Kim [Wed, 29 Feb 2012 19:08:25 +0000 (19:08 +0000)]
Test commit. Please ignore
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151738
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Wed, 29 Feb 2012 18:42:47 +0000 (18:42 +0000)]
[analyzer] Malloc: A pointer might escape through CFContainers APIs,
funopen, setvbuf.
Teach the checker and the engine about these APIs to resolve malloc
false positives. As I am adding more of these APIs, it is clear that all
this should be factored out into a separate callback (for example,
region escapes). Malloc, KeyChainAPI and RetainRelease checkers could
all use it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151737
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 29 Feb 2012 16:28:29 +0000 (16:28 +0000)]
Revert r151702, "Add support for handling captured variables in lambda debug
info.", which broke some -O0 -g tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151730
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Wed, 29 Feb 2012 15:06:12 +0000 (15:06 +0000)]
Add -C when linking on Solaris so that the error messages are understandable by actual humans.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151726
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 29 Feb 2012 12:47:43 +0000 (12:47 +0000)]
Tentatively fix PR12117. The test case from the bug now passes, and all existing tests still pass, but there may still be corner cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151716
91177308 -0d34-0410-b5e6-
96231b3b80d8
James Molloy [Wed, 29 Feb 2012 10:24:19 +0000 (10:24 +0000)]
Reapply r151638 and r151641.
The bug that was caught by Apple's internal buildbots was valid and also showed another bug in my implementation.
These are now fixed, with regression tests added to catch them both (not Darwin-specific).
Original log:
====================
Revert r151638 because it causes assertion hit on PCH creation for Cocoa.h
Original log:
---------------------
Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped.
This fixes code such as:
enum e {x, y};
int f(enum {y, x} n) {
return 0;
}
This finally fixes PR5464 and PR5477.
---------------------
I also reverted r151641 which was enhancement on top of r151638.
====================
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151712
91177308 -0d34-0410-b5e6-
96231b3b80d8
Erik Verbruggen [Wed, 29 Feb 2012 08:42:57 +0000 (08:42 +0000)]
Remove a recursive visitiation in ExprEngine that is no longer needed
because the CFG is fully linearized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151711
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Feb 2012 06:05:28 +0000 (06:05 +0000)]
[analyzer] Tweak the UnreachableCode checker to not warning about unreachable default blocks. Patch by Cyril Roelandt!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151709
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 29 Feb 2012 04:03:55 +0000 (04:03 +0000)]
A couple minor bug-fixes for template instantiation for expressions which are sometimes potentially evaluated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151707
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Feb 2012 03:43:52 +0000 (03:43 +0000)]
[driver] Emit an error when trying to use ARC on macosx earlier than 10.6
rdar://
10459258
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151706
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 29 Feb 2012 03:25:30 +0000 (03:25 +0000)]
Add support for handling captured variables in lambda debug info.
This currently doesn't handle capturing the 'this' pointer for any
enclosing class.
Steal the lambda-expressions.cpp testcase and debugify it and try
to use more variables to proof it against random changes.
Part of rdar://
10900684
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151702
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 29 Feb 2012 03:25:27 +0000 (03:25 +0000)]
Add some iterators for grabbing lambda expression contexts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151701
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 29 Feb 2012 03:25:18 +0000 (03:25 +0000)]
Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151700
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 29 Feb 2012 03:16:56 +0000 (03:16 +0000)]
Make the odr-use logic work correctly for constant-expressions. PR12006.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151699
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 29 Feb 2012 03:04:05 +0000 (03:04 +0000)]
Sema/ObjC: Override search can generate a large search list, bump the base size
of the SmallPtrSet way up to avoid commonly reallocating the buffer size.
- I didn't see a good argument against it, so I bumped the limit to cover the
max size we see during parsing Cocoa.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151698
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 29 Feb 2012 02:39:13 +0000 (02:39 +0000)]
ASTWriter: Cache some DenseMaps we use repeatedly.
- This reduces our total # of allocations building a PCH for Cocoa.h by almost
a whopping 50%.
- A SmallPtrMap would be cleaner, but since we don't have one yet...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151697
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 29 Feb 2012 02:04:39 +0000 (02:04 +0000)]
clang/test/Analysis/stats.c: Fix up r151656.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151695
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 29 Feb 2012 01:50:38 +0000 (01:50 +0000)]
clang/test/Analysis/stats.c: Mark this as XFAIL: mingw32.
FIXME: Could we guarantee not to get stack overflow also on mingw?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151692
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 29 Feb 2012 01:38:22 +0000 (01:38 +0000)]
Parse: Change PragmaPackHandler to use the preprocessor allocator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151689
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 29 Feb 2012 00:26:20 +0000 (00:26 +0000)]
objective-c modern translator. Fixes misc. bug in writing
the ivar offset symbol.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151683
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 29 Feb 2012 00:20:42 +0000 (00:20 +0000)]
Remove stray semi-colon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151682
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 29 Feb 2012 00:00:28 +0000 (00:00 +0000)]
Make sure list-initialization of arrays works correctly in explicit type conversions. PR12121.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151674
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 28 Feb 2012 23:39:24 +0000 (23:39 +0000)]
[libclang] Add a test I forgot to commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151669
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 28 Feb 2012 23:39:20 +0000 (23:39 +0000)]
[PCH] Include a darwin-only PCH test on Cocoa.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151668
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 28 Feb 2012 23:39:14 +0000 (23:39 +0000)]
Revert r151638 because it causes assertion hit on PCH creation for Cocoa.h
Original log:
---------------------
Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped.
This fixes code such as:
enum e {x, y};
int f(enum {y, x} n) {
return 0;
}
This finally fixes PR5464 and PR5477.
---------------------
I also reverted r151641 which was enhancement on top of r151638.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151667
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 28 Feb 2012 23:36:38 +0000 (23:36 +0000)]
Single- and zero-element initializer lists to scalars are list-initializations. Fixes PR12118.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151666
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 28 Feb 2012 23:27:39 +0000 (23:27 +0000)]
[analyzer diagnostics] Refactor filtration for PathDiagnosticConsumers that don't support cross-file diagnostics
into a common place. Currently enable this filtration for Plist diagnostics as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151664
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 28 Feb 2012 23:06:21 +0000 (23:06 +0000)]
[analyzer diagnostics] start prototyping stripping PathDiagnostics of unnecessary cruft caused by path inlining.
This introduces a concept of a "prunable" PathDiagnosticEvent. Currently this is a flag, but
we may evolve the concept to make this more dynamically inferred.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151663
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 28 Feb 2012 22:45:07 +0000 (22:45 +0000)]
Modern objective-c translator. rewriting ivars of aggregate type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151662
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 28 Feb 2012 22:39:22 +0000 (22:39 +0000)]
[analyzer] Leaks should be uniqued by the allocation point in the
closest function context (RetainCountChecker).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151661
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 28 Feb 2012 22:07:56 +0000 (22:07 +0000)]
Prefer bitcast+GEP over ptrtoint+sub+inttoptr: it's semantically equivalent here, and generally nicer to the optimizer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151659
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 28 Feb 2012 21:49:08 +0000 (21:49 +0000)]
[analyzer] Retain release: drop the line number info from the leak
message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151657
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 28 Feb 2012 21:49:04 +0000 (21:49 +0000)]
[analyzer] Stats: Add the stats about remove dead bindings, correct the
test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151656
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 28 Feb 2012 20:49:04 +0000 (20:49 +0000)]
[driver] Add support for -g2 and -ggdb debug flags.
rdar://
10947759
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151654
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Tue, 28 Feb 2012 20:06:45 +0000 (20:06 +0000)]
Add -lm by default on Solaris.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151653
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Tue, 28 Feb 2012 19:15:06 +0000 (19:15 +0000)]
It turns out -fno-cxa-atexit just produces broken code, so disable it on Solaris and we'll ship a __cxa_atexit implementation...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151648
91177308 -0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 28 Feb 2012 18:23:49 +0000 (18:23 +0000)]
Un-break clang based on r151638 - What was meant to be a trivial variable name change went horribly wrong and I forgot to retest afterwards.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151641
91177308 -0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 28 Feb 2012 18:12:11 +0000 (18:12 +0000)]
Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped.
This fixes code such as:
enum e {x, y};
int f(enum {y, x} n) {
return 0;
}
This finally fixes PR5464 and PR5477.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151638
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 28 Feb 2012 17:50:39 +0000 (17:50 +0000)]
[AST] When we @synthesize a property with a user-defined ivar name,
make sure to record the source location of the ivar name.
[libclang] When indexing @synthesized objc methods, report the @implementation
as the lexical container.
Fixes rdar://
10905472
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151635
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 28 Feb 2012 17:50:33 +0000 (17:50 +0000)]
[libclang] When indexing an objc property, also provide information about
the getter/setter objc method entities that the property is associated with.
rdar://
10244558
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151634
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 28 Feb 2012 17:50:28 +0000 (17:50 +0000)]
[AST] Associate the getter/setter methods to a property of a objc class extension.
[libclang] Index the getter/setter methods of a property of a objc class extension.
Fixes rdar://
10907597
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151633
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Tue, 28 Feb 2012 17:10:04 +0000 (17:10 +0000)]
Some more Solaris fixes. Now successfully building libc++ on Solaris with clang (and linking clang against it).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151632
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 28 Feb 2012 15:36:15 +0000 (15:36 +0000)]
Remove stray semi-colons.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151631
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 28 Feb 2012 03:32:48 +0000 (03:32 +0000)]
Basic coverage test for conversion-to-block-pointer for lambda expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151616
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 28 Feb 2012 03:07:06 +0000 (03:07 +0000)]
[analyzer] Leaks should be uniqued by the allocation point in the
closest function context (Keychain API).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151613
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 28 Feb 2012 01:54:22 +0000 (01:54 +0000)]
[analyzer] Fix Malloc False Positive (PR 12100)
When allocated buffer is passed to CF/NS..NoCopy functions, the
ownership is transfered unless the deallocator argument is set to
'kCFAllocatorNull'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151608
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 28 Feb 2012 01:08:45 +0000 (01:08 +0000)]
Implement IRGen for the retain-autorelease in the lambda conversion-to-block-pointer outside of ARC. Testcases coming up soon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151603
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 28 Feb 2012 00:56:05 +0000 (00:56 +0000)]
[analyzer] teach analyzer about ObjC literals, thus trimming out a false positive with the malloc() checker involving
comparing literal addresses to nil.
Fixes <rdar://problem/
10579586 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151602
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 27 Feb 2012 23:55:25 +0000 (23:55 +0000)]
Re-enable the Darwin ARM integrated assembler.
All known nightly-test failures are fixed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151595
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Mon, 27 Feb 2012 23:40:55 +0000 (23:40 +0000)]
[analyzer] Leaks should be uniqued by the allocation point in the
closest function context.
This prevents us from uniqueing all leaks from the same allocation
helper. radar://
10932226
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151592
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Mon, 27 Feb 2012 23:40:41 +0000 (23:40 +0000)]
Fix a test case that was added in r151570. The redirect of output was broken
so no testing was actually done. Further, the commands produce no output.
The redirection has been fixed and the test has been disabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151591
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 27 Feb 2012 23:34:19 +0000 (23:34 +0000)]
[analyzer] Don't generate an explicit ExplodedNode for StringLiterals; have the SVal lazily generated from Environment::getSVal().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151589
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Mon, 27 Feb 2012 23:20:01 +0000 (23:20 +0000)]
Hack in a loud error for PR12086. Better than a silent miscompile.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151586
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 27 Feb 2012 23:18:37 +0000 (23:18 +0000)]
When evaluating integer expressions include a check for sub-expressions
depth and error if we exceed a max value, to make sure we avoid a stack overflow.
This is a hacky temporary fix. rdar://
10913206 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151585
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 27 Feb 2012 22:55:11 +0000 (22:55 +0000)]
After numerous requests, have Objective-C 'method declared here' notes mention the actual method. This looks better within an IDE, where text isn't always regurgitated in the presentation of a warning. Fixes radar
10914035 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151579
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Mon, 27 Feb 2012 22:38:26 +0000 (22:38 +0000)]
Implement a FIXME for conversion sequence distinction. Should fix PR12092.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151577
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 27 Feb 2012 21:40:10 +0000 (21:40 +0000)]
Fix documentation typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151573
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Mon, 27 Feb 2012 21:33:16 +0000 (21:33 +0000)]
[analyzer] Add -analyzer-stats, which hooks up LLVM stats tracking.
As in http://llvm.org/docs/ProgrammersManual.html#Statistic
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151570
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 27 Feb 2012 21:21:40 +0000 (21:21 +0000)]
Fix a couple bugs in the way we handle array indexes in array bounds checking. Specifically, make sure we don't ignore explicit casts in indexes, and make sure we use unsigned extension/comparisons on indexes. Fixes <rdar://problem/
10916006 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151569
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 27 Feb 2012 21:09:45 +0000 (21:09 +0000)]
Move "clang/Analysis/Support/SaveAndRestore.h" to "llvm/ADT/SaveAndRestore.h"
to make it more widely available.
Depends on llvm commit r151564
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151566
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Mon, 27 Feb 2012 20:34:02 +0000 (20:34 +0000)]
Convert initializer lists to temporaries in CreateBuiltinBinOp. Allows assignment of init lists to built-in types and resolves PR12088.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151551
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 27 Feb 2012 20:26:13 +0000 (20:26 +0000)]
Add missing code for compound literals of complex type. <rdar://problem/
10938628 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151549
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 27 Feb 2012 20:21:34 +0000 (20:21 +0000)]
Revert testing code I committed by mistake in r151464.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151548
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 27 Feb 2012 20:04:30 +0000 (20:04 +0000)]
Just drop the bitfield from ExtProtoInfo, this struct isn't even heap allocated so it doesn't hurt.
MSVC < 10 still has the signed enum bitfield bug, making the top bit unusable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151545
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 27 Feb 2012 19:56:34 +0000 (19:56 +0000)]
Speculatively attempt to work around a hypothetical but unreproduced MSVC issue
in r151494.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151544
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 27 Feb 2012 18:45:03 +0000 (18:45 +0000)]
Test case for r151429/r151430, which ensures llvm.lifetime intrinsics are not
being emitted at -O0, but are emitted when optimizations are enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151533
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 27 Feb 2012 13:20:39 +0000 (13:20 +0000)]
Serialize InitListExpr's initializesStdInitializerList bit, so it's not left uninitialized.
Found by valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151527
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 27 Feb 2012 08:23:23 +0000 (08:23 +0000)]
ObjcInterfaceTypes are also complete types for the type cache.
Fixes rdar://
10934887
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151519
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 27 Feb 2012 08:22:57 +0000 (08:22 +0000)]
Make this test a bit more robust for debug info changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151518
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 27 Feb 2012 06:07:25 +0000 (06:07 +0000)]
Ensure that we delete default constructors in the right cases. Don't delete the
default constructor of a union if it has a const member with no user-provided
default constructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151516
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 27 Feb 2012 05:24:00 +0000 (05:24 +0000)]
Fix decltype crash-on-invalid, if we don't find a matching ')' for an ill-formed
decltype expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151515
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sun, 26 Feb 2012 23:49:01 +0000 (23:49 +0000)]
Tests for r151508.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151509
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sun, 26 Feb 2012 23:40:27 +0000 (23:40 +0000)]
Half of PR12088: parse braced-init-lists on the RHS of assignment operators.
If the assignment operator is a scalar type, we continue to incorrectly reject
the initializer, but semantic analysis (and codegen) is correct for overloaded
operators.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151508
91177308 -0d34-0410-b5e6-
96231b3b80d8
Gregory Szorc [Sun, 26 Feb 2012 21:56:32 +0000 (21:56 +0000)]
[clang.py] Test Cursor.__ne__
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151504
91177308 -0d34-0410-b5e6-
96231b3b80d8