summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Update test for r133934.John McCall2011-06-271-1/+1
| | | | llvm-svn: 133942
* Handle nonnull attribute with optional argument number onFariborz Jahanian2011-06-271-0/+21
| | | | | | | functions with arguments of transparent unions type. // rdar://9584012 llvm-svn: 133941
* [analyzer] Use UnknownVal when default-initializing arrays whose element ↵Jordy Rose2011-06-272-0/+18
| | | | | | types we don't model, to distinguish them from uninitialized arrays (PR10163). llvm-svn: 133937
* Revert parts of r133860 to fix a crash. Add a test.Nico Weber2011-06-271-0/+7
| | | | llvm-svn: 133931
* [libclang] Avoid having the cursor of an expression replace the declaration ↵Argyrios Kyrtzidis2011-06-271-0/+7
| | | | | | | | | | | | | | | cursor when the expression source range overlaps the declaration range. This can happen for C++ constructor expressions whose range generally include the variable declaration, e.g.: MyCXXClass foo; // Make sure pointing at 'foo' returns a VarDecl cursor. rdar://9124499. llvm-svn: 133930
* [libclang] Avoid having the cursor of an expression "overwrite" the ↵Argyrios Kyrtzidis2011-06-271-2/+6
| | | | | | | | | | | | | | | annotation of the variable declaration that it belongs to. This can happen for C++ constructor expressions whose range generally include the variable declaration, e.g.: MyCXXClass foo; // Make sure we don't annotate 'foo' as a CallExpr cursor. rdar://9124499. llvm-svn: 133929
* When instantiating a C++ "new" expression, don't fake source locationsDouglas Gregor2011-06-271-0/+13
| | | | | | | | for the '(' and ')' around the initializer unless we actually have an initializer. Fixes PR10197, an issue where we were value-initializing rather than default-initializing. llvm-svn: 133913
* Cleanup a fixme by using a specific diagnostic for subscriptingChandler Carruth2011-06-271-1/+1
| | | | | | a pointer to void. llvm-svn: 133912
* Fix missing braces around two statements that were intended to be partChandler Carruth2011-06-271-0/+7
| | | | | | | | | | | of a single if block. This is really annoying to track down and test. Silly changes to the test case caused it to stop showing up. I wish there were a more concrete way of asserting that a note attaches to the intended diagnostic. This fixes PR10195. llvm-svn: 133907
* Factor out (some of) the checking for invalid forms of pointerChandler Carruth2011-06-278-23/+23
| | | | | | | | | | | | | | | | | | | arithmetic into a couple of common routines. Use these to make the messages more consistent in the various contexts, especially in terms of consistently diagnosing binary operators with invalid types on both the left- and right-hand side. Also, improve the grammar and wording of the messages some, handling both two pointers and two (different) types. The wording of function pointer arithmetic diagnostics still strikes me as poorly phrased, and I worry this makes them slightly more awkward if more consistent. I'm hoping to fix that with a follow-on patch and test case that will also make them more helpful when a typedef or template type parameter makes the type completely opaque. Suggestions on better wording are very welcome, thanks to Richard Smith for some initial help on that front. llvm-svn: 133906
* Fix PR10187: when diagnosing a two-phase-lookup-related failure, don't ↵Richard Smith2011-06-261-0/+30
| | | | | | assert that any names we find are valid candidates for the call. llvm-svn: 133898
* Fix a couple more issues related to r133854:Richard Smith2011-06-251-1/+4
| | | | | | | | When performing semantic analysis on a member declaration, fix the check for whether we are declaring a function to check for parenthesized declarators, declaration via decltype, etc. Also fix the semantic check to not treat FuncType* as a function type. llvm-svn: 133862
* Do not apply the ARC move optimization to 'const'-qualified xvalues.John McCall2011-06-251-0/+12
| | | | llvm-svn: 133861
* Mark the multiply which occurs as part of performing pointerJohn McCall2011-06-252-3/+46
| | | | | | | | arithmetic on a VLA as 'nsw', per discussion with djg, and implement pointer arithmetic (other than array accesses) and pointer subtraction for VLA types. llvm-svn: 133855
* When deciding how to parse "= something" as part of a memberDouglas Gregor2011-06-251-10/+16
| | | | | | | | | declaration, determine whether the declaration will end up declaring a function using semantic criteria (e.g., it will have function type) rather than purely syntactic criteria (e.g., it has the form of a function declarator). Fixes <rdar://problem/9670557>. llvm-svn: 133854
* objc-arc/mrc: Allow ns_returns_not_retained attribute on propertiesFariborz Jahanian2011-06-252-0/+41
| | | | | | | | | to turn off warning on those properties which follow Cocoa naming convention for retaining objects and yet they were not meant for such purposes. Also, perform consistancy checking for declared getters of such methods. // rdar://9636091 llvm-svn: 133849
* Two more test cases which have been long uncommitted.John McCall2011-06-242-0/+219
| | | | llvm-svn: 133842
* Test case for r133840, neglectfully uncommitted.John McCall2011-06-241-0/+14
| | | | llvm-svn: 133841
* Fix struct member's scope. Patch by Xi Wang.Devang Patel2011-06-241-0/+3
| | | | llvm-svn: 133829
* Change the IR-generation of VLAs so that we capture bounds,John McCall2011-06-243-25/+75
| | | | | | | not sizes; so that we use well-typed allocas; and so that we properly recurse through the full set of variably-modified types. llvm-svn: 133827
* No need to warn if 'unavailable' method/property Fariborz Jahanian2011-06-241-0/+12
| | | | | | is not implemented. // rdar://9651605 llvm-svn: 133819
* Only do delayed diagnostics if there were no errors when parsing the decl.Argyrios Kyrtzidis2011-06-241-0/+19
| | | | | | Fixes crash in http://llvm.org/PR10109 & rdar://9584039. llvm-svn: 133816
* [arcmt] Add test for rdar://9601437.Argyrios Kyrtzidis2011-06-241-0/+13
| | | | llvm-svn: 133807
* objc-arc: Check on a variety of unsafe assignment of retained Fariborz Jahanian2011-06-242-2/+43
| | | | | | objects. // rdar://9495837 llvm-svn: 133806
* Allow Lexer::getLocForEndOfToken to return the location just passed the ↵Argyrios Kyrtzidis2011-06-241-0/+5
| | | | | | | | | | macro instantiation if the location given points at the last token of the macro instantiation. Fixes rdar://9045701. llvm-svn: 133804
* Allow the fixit for missing ':' in the ?: ternary operator if it is pointingArgyrios Kyrtzidis2011-06-241-0/+5
| | | | | | at the start of a macro instantiation. llvm-svn: 133801
* This patch started as an attempt to fix up the horrid namingAlexis Hunt2011-06-241-16/+0
| | | | | | | | | | | | conventions. I then discovered a typo in the using declaration bit in LookupSpecialMember. This led to discovering [namespace.udecl]p15, which clang implements incorrectly. Thus I've added a comment and implemented the code consistently with the rest of clang - that is incorrectly. And because I don't want to include tests of something incorrect, I've ripped the test out. llvm-svn: 133784
* Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about ↵Argyrios Kyrtzidis2011-06-2415-61/+61
| | | | | | | | 'ownership', not 'lifetime'. rdar://9477613. llvm-svn: 133779
* When forming a cycle in objc's inheritance hierarchy,Fariborz Jahanian2011-06-233-7/+18
| | | | | | | diagnose it properly and don't throw clang into an infinit loop. // rdar://9653341 llvm-svn: 133773
* [arcmt] Fully migrate ObjC++ classes, rdar://9660007.Argyrios Kyrtzidis2011-06-232-0/+62
| | | | llvm-svn: 133763
* [arcmt] Remove rewriteAllocCopyWithZone transformation; not needed anymore.Argyrios Kyrtzidis2011-06-234-179/+0
| | | | llvm-svn: 133762
* Improve on warning when objc pointer is used inFariborz Jahanian2011-06-231-1/+1
| | | | | | c++ catch in fragile abi - per Eli's request. llvm-svn: 133760
* Support for catching objc pointer objects in c++ catch-statementFariborz Jahanian2011-06-232-2/+17
| | | | | | in fragile abi mode and some other cleanups. // rdar://8940528 llvm-svn: 133747
* Fix Sema::CheckVectorOperands so that it doesn't try to insert a cast ↵Eli Friedman2011-06-233-5/+12
| | | | | | | | expression into the LHS of a compound assignment. Fixes compound assignment of various "compatible" vector types, including NEON-vector and gcc-vector types. <rdar://problem/9640356> llvm-svn: 133737
* cmake+lit: final cleanup related to the recent churnAndrew Trick2011-06-231-6/+1
| | | | llvm-svn: 133730
* Fix this test on machines that don't run clang -cc1as when asked to assemble.Nick Lewycky2011-06-231-1/+1
| | | | llvm-svn: 133688
* Allow unavailable function calls inside unavailable functions in C++/ObjC++ ↵Argyrios Kyrtzidis2011-06-231-0/+9
| | | | | | as well. rdar://9660196 llvm-svn: 133672
* Clean up the heart of the caching code and miss fewer edge cases.Alexis Hunt2011-06-231-0/+16
| | | | llvm-svn: 133671
* lit support for REQUIRES: asserts.Andrew Trick2011-06-222-2/+0
| | | | | | | | | | Take #2. Don't piggyback on the existing config.build_mode. Instead, define a new lit feature for each build feature we need (currently just "asserts"). Teach both autoconf'd and cmake'd Makefiles to define this feature within test/lit.site.cfg. This doesn't require any lit harness changes and should be more robust across build systems. llvm-svn: 133665
* Check for placeholders early on inDouglas Gregor2011-06-221-0/+6
| | | | | | | Sema::CreateUnaryExprOrTypeTraitExpr() rather than recursing in some cases. Fixes <rdar://problem/9659191>. llvm-svn: 133663
* Issue warning if weak_import attribute is added to an alreadyFariborz Jahanian2011-06-222-1/+5
| | | | | | declared variable and ignore it. // rdar://9538608 llvm-svn: 133654
* test/Unit: Fixup lit.cfg to allow running inside test/Unit (with llvm-config inDaniel Dunbar2011-06-221-9/+9
| | | | | | path). llvm-svn: 133653
* Alloa catching Objective-C id's being thrown with C++ throwFariborz Jahanian2011-06-221-0/+33
| | | | | | in Darwin's fragile abi mode. // rdar://8940528 llvm-svn: 133639
* Changes ParenListExpr to always require a type.Manuel Klimek2011-06-221-0/+17
| | | | | | | Removes dead code found in the process. Adds a test to verify that ParenListExprs do not have NULL types. llvm-svn: 133637
* Copy diagnostic pragmas to the preprocessed output, from Richard Osborne!Douglas Gregor2011-06-221-0/+26
| | | | llvm-svn: 133633
* When instantiating a function template declaration that was expressedDouglas Gregor2011-06-221-0/+11
| | | | | | | via a typedef of a function, make sure to synthesize parameter declarations. Fixes PR9654 / <rdar://problem/9257497>. llvm-svn: 133628
* [arcmt] Make -Warc-unsafe-retained-assign an error when migrating. ↵Argyrios Kyrtzidis2011-06-221-0/+12
| | | | | | rdar://8939557 llvm-svn: 133627
* Change "cannot assign retained object.." warning to "assigning retained ↵Argyrios Kyrtzidis2011-06-221-4/+4
| | | | | | object.." llvm-svn: 133625
* objc-arc: Allow unbridged cast of retainable object toFariborz Jahanian2011-06-221-0/+9
| | | | | | | integral as it is not transferring ownership.. // rdar://9619861 llvm-svn: 133622
* Implement the C++0x move optimization for Automatic Reference CountingDouglas Gregor2011-06-221-0/+63
| | | | | | | | objects, so that we steal the retain count of a temporary __strong pointer (zeroing out that temporary), eliding a retain/release pair. Addresses <rdar://problem/9364932>. llvm-svn: 133621
OpenPOWER on IntegriCloud