summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Tentatively fix PR12117. The test case from the bug now passes, and all ↵Sebastian Redl2012-02-292-8/+17
| | | | | | existing tests still pass, but there may still be corner cases. llvm-svn: 151716
* Reapply r151638 and r151641.James Molloy2012-02-2916-6/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ==================== llvm-svn: 151712
* Remove a recursive visitiation in ExprEngine that is no longer neededErik Verbruggen2012-02-292-10/+7
| | | | | | because the CFG is fully linearized. llvm-svn: 151711
* [analyzer] Tweak the UnreachableCode checker to not warning about ↵Ted Kremenek2012-02-292-0/+25
| | | | | | unreachable default blocks. Patch by Cyril Roelandt! llvm-svn: 151709
* A couple minor bug-fixes for template instantiation for expressions which ↵Eli Friedman2012-02-294-12/+35
| | | | | | are sometimes potentially evaluated. llvm-svn: 151707
* [driver] Emit an error when trying to use ARC on macosx earlier than 10.6Argyrios Kyrtzidis2012-02-296-5/+22
| | | | | | rdar://10459258 llvm-svn: 151706
* Add support for handling captured variables in lambda debug info.Eric Christopher2012-02-292-30/+132
| | | | | | | | | | | | 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 llvm-svn: 151702
* Add some iterators for grabbing lambda expression contexts.Eric Christopher2012-02-291-0/+8
| | | | llvm-svn: 151701
* Formatting.Eric Christopher2012-02-291-1/+1
| | | | llvm-svn: 151700
* Make the odr-use logic work correctly for constant-expressions. PR12006.Eli Friedman2012-02-295-4/+25
| | | | llvm-svn: 151699
* Sema/ObjC: Override search can generate a large search list, bump the base sizeDaniel Dunbar2012-02-291-3/+4
| | | | | | | | 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. llvm-svn: 151698
* ASTWriter: Cache some DenseMaps we use repeatedly.Daniel Dunbar2012-02-292-5/+16
| | | | | | | | - 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... llvm-svn: 151697
* clang/test/Analysis/stats.c: Fix up r151656.NAKAMURA Takumi2012-02-291-1/+1
| | | | llvm-svn: 151695
* clang/test/Analysis/stats.c: Mark this as XFAIL: mingw32.NAKAMURA Takumi2012-02-291-0/+3
| | | | | FIXME: Could we guarantee not to get stack overflow also on mingw? llvm-svn: 151692
* Parse: Change PragmaPackHandler to use the preprocessor allocator.Daniel Dunbar2012-02-291-7/+16
| | | | llvm-svn: 151689
* objective-c modern translator. Fixes misc. bug in writing Fariborz Jahanian2012-02-291-2/+2
| | | | | | the ivar offset symbol. llvm-svn: 151683
* Remove stray semi-colon.Daniel Dunbar2012-02-291-1/+1
| | | | llvm-svn: 151682
* Make sure list-initialization of arrays works correctly in explicit type ↵Eli Friedman2012-02-294-15/+43
| | | | | | conversions. PR12121. llvm-svn: 151674
* [libclang] Add a test I forgot to commit.Argyrios Kyrtzidis2012-02-281-0/+24
| | | | llvm-svn: 151669
* [PCH] Include a darwin-only PCH test on Cocoa.h.Argyrios Kyrtzidis2012-02-281-0/+7
| | | | llvm-svn: 151668
* Revert r151638 because it causes assertion hit on PCH creation for Cocoa.hArgyrios Kyrtzidis2012-02-2815-175/+6
| | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 151667
* Single- and zero-element initializer lists to scalars are ↵Sebastian Redl2012-02-282-0/+43
| | | | | | list-initializations. Fixes PR12118. llvm-svn: 151666
* [analyzer diagnostics] Refactor filtration for PathDiagnosticConsumers that ↵Ted Kremenek2012-02-283-37/+49
| | | | | | | | don't support cross-file diagnostics into a common place. Currently enable this filtration for Plist diagnostics as well. llvm-svn: 151664
* [analyzer diagnostics] start prototyping stripping PathDiagnostics of ↵Ted Kremenek2012-02-284-3/+74
| | | | | | | | | 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. llvm-svn: 151663
* Modern objective-c translator. rewriting ivars of aggregate type.Fariborz Jahanian2012-02-282-15/+167
| | | | llvm-svn: 151662
* [analyzer] Leaks should be uniqued by the allocation point in theAnna Zaks2012-02-282-8/+39
| | | | | | closest function context (RetainCountChecker). llvm-svn: 151661
* Prefer bitcast+GEP over ptrtoint+sub+inttoptr: it's semantically equivalent ↵Eli Friedman2012-02-281-3/+3
| | | | | | here, and generally nicer to the optimizer. llvm-svn: 151659
* [analyzer] Retain release: drop the line number info from the leakAnna Zaks2012-02-284-6/+5
| | | | | | message. llvm-svn: 151657
* [analyzer] Stats: Add the stats about remove dead bindings, correct theAnna Zaks2012-02-282-3/+14
| | | | | | test. llvm-svn: 151656
* [driver] Add support for -g2 and -ggdb debug flags.Chad Rosier2012-02-282-0/+10
| | | | | | rdar://10947759 llvm-svn: 151654
* Add -lm by default on Solaris.David Chisnall2012-02-281-0/+1
| | | | llvm-svn: 151653
* It turns out -fno-cxa-atexit just produces broken code, so disable it on ↵David Chisnall2012-02-281-1/+1
| | | | | | Solaris and we'll ship a __cxa_atexit implementation... llvm-svn: 151648
* Un-break clang based on r151638 - What was meant to be a trivial variable ↵James Molloy2012-02-281-1/+1
| | | | | | name change went horribly wrong and I forgot to retest afterwards. llvm-svn: 151641
* Correctly track tags and enum members defined in the prototype of a ↵James Molloy2012-02-2815-6/+175
| | | | | | | | | | | | | | | 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. llvm-svn: 151638
* [AST] When we @synthesize a property with a user-defined ivar name,Argyrios Kyrtzidis2012-02-284-14/+23
| | | | | | | | | | 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 llvm-svn: 151635
* [libclang] When indexing an objc property, also provide information aboutArgyrios Kyrtzidis2012-02-286-2/+70
| | | | | | | | the getter/setter objc method entities that the property is associated with. rdar://10244558 llvm-svn: 151634
* [AST] Associate the getter/setter methods to a property of a objc class ↵Argyrios Kyrtzidis2012-02-282-15/+37
| | | | | | | | | | extension. [libclang] Index the getter/setter methods of a property of a objc class extension. Fixes rdar://10907597 llvm-svn: 151633
* Some more Solaris fixes. Now successfully building libc++ on Solaris with ↵David Chisnall2012-02-283-13/+21
| | | | | | clang (and linking clang against it). llvm-svn: 151632
* Remove stray semi-colons.Daniel Dunbar2012-02-281-2/+2
| | | | llvm-svn: 151631
* Basic coverage test for conversion-to-block-pointer for lambda expressions.Eli Friedman2012-02-281-0/+18
| | | | llvm-svn: 151616
* [analyzer] Leaks should be uniqued by the allocation point in theAnna Zaks2012-02-282-7/+15
| | | | | | closest function context (Keychain API). llvm-svn: 151613
* [analyzer] Fix Malloc False Positive (PR 12100)Anna Zaks2012-02-285-21/+89
| | | | | | | | When allocated buffer is passed to CF/NS..NoCopy functions, the ownership is transfered unless the deallocator argument is set to 'kCFAllocatorNull'. llvm-svn: 151608
* Implement IRGen for the retain-autorelease in the lambda ↵Eli Friedman2012-02-283-2/+27
| | | | | | conversion-to-block-pointer outside of ARC. Testcases coming up soon. llvm-svn: 151603
* [analyzer] teach analyzer about ObjC literals, thus trimming out a false ↵Ted Kremenek2012-02-285-1/+99
| | | | | | | | | | positive with the malloc() checker involving comparing literal addresses to nil. Fixes <rdar://problem/10579586> llvm-svn: 151602
* Re-enable the Darwin ARM integrated assembler.Jim Grosbach2012-02-271-3/+2
| | | | | | All known nightly-test failures are fixed. llvm-svn: 151595
* [analyzer] Leaks should be uniqued by the allocation point in theAnna Zaks2012-02-272-9/+17
| | | | | | | | | closest function context. This prevents us from uniqueing all leaks from the same allocation helper. radar://10932226 llvm-svn: 151592
* Fix a test case that was added in r151570. The redirect of output was brokenRichard Trieu2012-02-271-1/+2
| | | | | | | so no testing was actually done. Further, the commands produce no output. The redirection has been fixed and the test has been disabled. llvm-svn: 151591
* [analyzer] Don't generate an explicit ExplodedNode for StringLiterals; have ↵Ted Kremenek2012-02-274-20/+7
| | | | | | the SVal lazily generated from Environment::getSVal(). llvm-svn: 151589
* Hack in a loud error for PR12086. Better than a silent miscompile.Sebastian Redl2012-02-272-1/+49
| | | | llvm-svn: 151586
* When evaluating integer expressions include a check for sub-expressionsArgyrios Kyrtzidis2012-02-273-1/+2037
| | | | | | | | 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. llvm-svn: 151585
OpenPOWER on IntegriCloud