summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Tentatively fix PR12117. The test case from the bug now passes, and all ↵Sebastian Redl2012-02-291-0/+6
| | | | | | existing tests still pass, but there may still be corner cases. llvm-svn: 151716
* Reapply r151638 and r151641.James Molloy2012-02-294-2/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-291-1/+4
| | | | | | because the CFG is fully linearized. llvm-svn: 151711
* [analyzer] Tweak the UnreachableCode checker to not warning about ↵Ted Kremenek2012-02-291-0/+17
| | | | | | unreachable default blocks. Patch by Cyril Roelandt! llvm-svn: 151709
* A couple minor bug-fixes for template instantiation for expressions which ↵Eli Friedman2012-02-292-0/+20
| | | | | | are sometimes potentially evaluated. llvm-svn: 151707
* [driver] Emit an error when trying to use ARC on macosx earlier than 10.6Argyrios Kyrtzidis2012-02-291-5/+8
| | | | | | rdar://10459258 llvm-svn: 151706
* Add support for handling captured variables in lambda debug info.Eric Christopher2012-02-291-0/+71
| | | | | | | | | | | | 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
* Make the odr-use logic work correctly for constant-expressions. PR12006.Eli Friedman2012-02-291-3/+2
| | | | llvm-svn: 151699
* 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
* Make sure list-initialization of arrays works correctly in explicit type ↵Eli Friedman2012-02-292-0/+24
| | | | | | 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-283-49/+2
| | | | | | | | | | | | | | | | | | | | 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-281-0/+42
| | | | | | list-initializations. Fixes PR12118. llvm-svn: 151666
* Modern objective-c translator. rewriting ivars of aggregate type.Fariborz Jahanian2012-02-281-0/+89
| | | | llvm-svn: 151662
* [analyzer] Leaks should be uniqued by the allocation point in theAnna Zaks2012-02-281-4/+23
| | | | | | closest function context (RetainCountChecker). llvm-svn: 151661
* [analyzer] Retain release: drop the line number info from the leakAnna Zaks2012-02-283-3/+3
| | | | | | message. llvm-svn: 151657
* [analyzer] Stats: Add the stats about remove dead bindings, correct theAnna Zaks2012-02-281-3/+3
| | | | | | test. llvm-svn: 151656
* [driver] Add support for -g2 and -ggdb debug flags.Chad Rosier2012-02-281-0/+8
| | | | | | rdar://10947759 llvm-svn: 151654
* Correctly track tags and enum members defined in the prototype of a ↵James Molloy2012-02-283-2/+49
| | | | | | | | | | | | | | | 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
* 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-281-2/+3
| | | | | | closest function context (Keychain API). llvm-svn: 151613
* [analyzer] Fix Malloc False Positive (PR 12100)Anna Zaks2012-02-283-13/+60
| | | | | | | | 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
* [analyzer] teach analyzer about ObjC literals, thus trimming out a false ↵Ted Kremenek2012-02-281-0/+37
| | | | | | | | | | positive with the malloc() checker involving comparing literal addresses to nil. Fixes <rdar://problem/10579586> llvm-svn: 151602
* [analyzer] Leaks should be uniqued by the allocation point in theAnna Zaks2012-02-271-3/+4
| | | | | | | | | 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
* Hack in a loud error for PR12086. Better than a silent miscompile.Sebastian Redl2012-02-271-0/+37
| | | | llvm-svn: 151586
* When evaluating integer expressions include a check for sub-expressionsArgyrios Kyrtzidis2012-02-271-0/+2011
| | | | | | | | 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
* After numerous requests, have Objective-C 'method declared here' notes ↵Ted Kremenek2012-02-2714-45/+44
| | | | | | 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. llvm-svn: 151579
* Implement a FIXME for conversion sequence distinction. Should fix PR12092.Sebastian Redl2012-02-271-0/+18
| | | | llvm-svn: 151577
* [analyzer] Add -analyzer-stats, which hooks up LLVM stats tracking.Anna Zaks2012-02-271-0/+6
| | | | | | As in http://llvm.org/docs/ProgrammersManual.html#Statistic llvm-svn: 151570
* Fix a couple bugs in the way we handle array indexes in array bounds ↵Eli Friedman2012-02-271-0/+6
| | | | | | 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>. llvm-svn: 151569
* Convert initializer lists to temporaries in CreateBuiltinBinOp. Allows ↵Sebastian Redl2012-02-271-3/+2
| | | | | | assignment of init lists to built-in types and resolves PR12088. llvm-svn: 151551
* Add missing code for compound literals of complex type. ↵Eli Friedman2012-02-271-1/+7
| | | | | | <rdar://problem/10938628> llvm-svn: 151549
* Test case for r151429/r151430, which ensures llvm.lifetime intrinsics are notChad Rosier2012-02-271-0/+23
| | | | | | being emitted at -O0, but are emitted when optimizations are enabled. llvm-svn: 151533
* Make this test a bit more robust for debug info changes.Eric Christopher2012-02-271-2/+2
| | | | llvm-svn: 151518
* Ensure that we delete default constructors in the right cases. Don't delete theRichard Smith2012-02-271-11/+16
| | | | | | | default constructor of a union if it has a const member with no user-provided default constructor. llvm-svn: 151516
* Fix decltype crash-on-invalid, if we don't find a matching ')' for an ill-formedRichard Smith2012-02-271-2/+2
| | | | | | decltype expression. llvm-svn: 151515
* Tests for r151508.Richard Smith2012-02-262-0/+34
| | | | llvm-svn: 151509
* Okay, makes sense to change all the occurences to match clang.EXE.Benjamin Kramer2012-02-261-3/+3
| | | | llvm-svn: 151491
* Allow any file extension for the clang binary in the linux-header-search test.Benjamin Kramer2012-02-261-1/+1
| | | | | | Turns out this can be .exe or .EXE, depending on the build system. llvm-svn: 151490
* Don't assert when trying to diagnose why a class with a constructor template isRichard Smith2012-02-262-0/+8
| | | | | | non-trivial. llvm-svn: 151486
* Add the critical crtbegin.o files necessary for any of the tests inChandler Carruth2012-02-264-0/+0
| | | | | | r151482 and r151484 to work. Sorry about the fallout... llvm-svn: 151485
* A follow-up to r151482 which added support for powerpc and powerpc64Chandler Carruth2012-02-261-0/+58
| | | | | | | | | | | | | | | | | Debian multiarch libraries, this should in theory add support for those platform's header search rules. I don't have a system to check this with, so review appreciated. I've added the corresponding tests referring to the debian multiarch tree. We are starting to have a relatively completely tested Linux platform for header search and library search, with several interesting peculiarities. We should point people at the debian_multiarch_tree when suggesting new tests. Folks with Debian systems that can check this for correctness, it would be much appreciated. The missing chunks I know of are testing bi-arch peudo-cross-compiling toolchains betwen 32-bit and 64-bit variants of platforms, and the MIPS and ARM Debian toolchains. llvm-svn: 151484
* Ensure that we delete destructors in the right cases. Specifically:Richard Smith2012-02-261-0/+103
| | | | | | | | | | | | | | - variant members with nontrivial destructors make the containing class's destructor deleted - check for a virtual destructor after checking for overridden methods in the base class(es) - check for an inaccessible operator delete for a class with a virtual destructor. Do not try to call an anonymous union field's destructor from the destructor of the containing class. llvm-svn: 151483
* Add support for PPC and PPC64 multiarch toolchains on Debain.Chandler Carruth2012-02-2622-0/+51
| | | | | | | | | | | | | | | | | Patch from Michel Dänzer, sent our way via Jeremy Huddleston who added 64-bit support. I just added one other place where powerpc64-linux-gnu was missing (we only had powerpc64-unknown-linux-gnu). I've also added a tree to test out the debian multiarch stuff. I don't use debian regularly, so I'm not certain this is entirely accurate. If anyone wants to check it against a debian system and fix any inaccuracies, fire away. This way at least folks can see how this is *supposed* to be tested. It'd be particularly good to get the Debian MIPS toolchains tested in this way. llvm-svn: 151482
* Make sure we don't try to produce a definition of an implicitly-deleted functionRichard Smith2012-02-261-5/+5
| | | | llvm-svn: 151478
* Special members which are defaulted or deleted on their first declaration areRichard Smith2012-02-265-24/+94
| | | | | | | | | | | | | trivial if the implicit declaration would be. Don't forget to set the Trivial flag on the special member as well as on the class. It doesn't seem ideal that we have two separate mechanisms for storing this information, but this patch does not attempt to address that. This leaves us in an interesting position where the has_trivial_X trait for a class says 'yes' for a deleted but trivial X, but is_trivially_Xable says 'no'. This seems to be what the standard requires. llvm-svn: 151465
* Revert r151460 as it is not enough to address the issue.Argyrios Kyrtzidis2012-02-251-2009/+0
| | | | | | | | | | | Original log: When evaluating integer expressions handle logical operators outside VisitBinaryOperator() to reduce stack pressure for source with huge number of logical operators. Fixes rdar://10913206. llvm-svn: 151464
OpenPOWER on IntegriCloud