summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix regression in static analyzer's handling of prefix '--' operator. It ↵Ted Kremenek2011-05-201-0/+24
| | | | | | was being treated as postfix '--' in C mode. llvm-svn: 131770
* Add a missing case for default constructor deletion.Alexis Hunt2011-05-201-5/+4
| | | | | | | This case is tested by the fact that the modified test produces significatly worse diagnostics. That's on the list. llvm-svn: 131759
* Introduce XFAILed test for braced initializer lists.Sebastian Redl2011-05-201-0/+127
| | | | llvm-svn: 131754
* Introduce Type::isSignedIntegerOrEnumerationType() andDouglas Gregor2011-05-201-0/+9
| | | | | | | | | | | | | Type::isUnsignedIntegerOrEnumerationType(), which are like Type::isSignedIntegerType() and Type::isUnsignedIntegerType() but also consider the underlying type of a C++0x scoped enumeration type. Audited all callers to the existing functions, switching those that need to also handle scoped enumeration types (e.g., those that deal with constant values) over to the new functions. Fixes PR9923 / <rdar://problem/9447851>. llvm-svn: 131735
* Downgrade the error about re-opening an inline namespace as non-inlineDouglas Gregor2011-05-201-1/+1
| | | | | | | to a warning, since apparently libstdc++'s debug mode does this (and we can recover safely). Add a Fix-It to insert the "inline", just for kicks. llvm-svn: 131732
* Diagnose unexpanded parameter packs in return statements. ThisDouglas Gregor2011-05-201-0/+7
| | | | | | | manifested in a crash with blocks in PR9953, but it was a ticking time bomb for normal functions, too. Fixes PR9953. llvm-svn: 131731
* Remove the clang-test-XXX targets from the CMake builds; they really aren't ↵Douglas Gregor2011-05-201-24/+0
| | | | | | useful llvm-svn: 131728
* Fix PR9941 for out-of-line template destructors too.Sebastian Redl2011-05-201-0/+6
| | | | llvm-svn: 131722
* Undo enough of r131143 to make private copy ctor diags say "copy ↵Matt Beaumont-Gay2011-05-191-2/+2
| | | | | | constructor" again llvm-svn: 131706
* Teach RegionStore not to symbolic array values whose indices it cannot ↵Ted Kremenek2011-05-191-0/+19
| | | | | | reason about. llvm-svn: 131702
* Fix location of setter/getter synthesized for a property.Devang Patel2011-05-191-0/+19
| | | | llvm-svn: 131701
* Revert r131672 until __underlying_type is properly implemented in theAlexis Hunt2011-05-191-4/+0
| | | | | | template case. llvm-svn: 131692
* Fix test on Windows.Eli Friedman2011-05-191-1/+1
| | | | llvm-svn: 131691
* Implement a __has_feature for __underlying_typeAlexis Hunt2011-05-191-0/+4
| | | | llvm-svn: 131672
* Add a test for __underlying_typeAlexis Hunt2011-05-191-0/+27
| | | | llvm-svn: 131670
* Fix PR9941 again, this time for templates.Sebastian Redl2011-05-191-0/+29
| | | | llvm-svn: 131640
* Reapply r121528, fixing PR9941 by delaying the exception specification check ↵Sebastian Redl2011-05-194-13/+148
| | | | | | for destructors until the class is complete and destructors have been adjusted. llvm-svn: 131632
* Teach static analyzer to analyze Objective-C methods in category ↵Ted Kremenek2011-05-191-0/+14
| | | | | | implementations. llvm-svn: 131614
* Make __builtin_shufflevector and -ftrapv work correctly together. PR9945.Eli Friedman2011-05-191-1/+2
| | | | llvm-svn: 131611
* Revert r121528 as it breaks a simple testcase, which leads to, amongAlexis Hunt2011-05-184-133/+13
| | | | | | other things, libcxx not building. llvm-svn: 131573
* Implement implicit exception specifications of destructors.Sebastian Redl2011-05-183-6/+133
| | | | llvm-svn: 131528
* Implement an additional fix for infinite recursion of deleted specialAlexis Hunt2011-05-181-0/+14
| | | | | | | | | | | | | | | | member functions by making sure that they're on the record before checking for deletion. Also make sure source locations are valid to avoid crashes. Unfortunately, the declare-all-implicit-members approach is still required in order to ensure that dependency loops do not result in incorrectly deleting functions (since they are to be deleted at the declaration point per the standard). Fixes PR9917 llvm-svn: 131520
* Patch to fix IR-gen crash generating structure ABI which implementsFariborz Jahanian2011-05-172-1/+24
| | | | | | | user specified string class via -fconstant-string-class option. pr9914. llvm-svn: 131496
* For calls returning first-class aggregates, store by element instead of ↵Eli Friedman2011-05-171-1/+6
| | | | | | creating aggregate stores in common cases. This is more friendly to fast-isel. llvm-svn: 131490
* Revert r131434, my commit disabling the complete-object constructorJohn McCall2011-05-171-20/+0
| | | | | | | optimization for abstract classes; there was a misunderstanding, and it turns out that there are no kexts which rely on this. llvm-svn: 131489
* Fix some minor bugs and add a lot more test cases for defaultedAlexis Hunt2011-05-171-0/+69
| | | | | | | constructors, including two more FIXMEs (one of which I don't actually understand). llvm-svn: 131487
* Add some more tests.Alexis Hunt2011-05-171-0/+74
| | | | | | | | I have on that's #if 0'ed out, and I don't know why it's failing to delete the constructor. I'd appreciate if someone familiar with access control could look into ShouldDeleteDefaultConstructor - thanks. llvm-svn: 131486
* The logic about -static is darwin only. For now assume that all nonRafael Espindola2011-05-171-0/+8
| | | | | | darwin assembler can handle cfi. Add a test. llvm-svn: 131464
* Reapply the commits that r131401 reverted and add a fix for PR9927.Argyrios Kyrtzidis2011-05-173-18/+87
| | | | llvm-svn: 131446
* Implement some tests for defaulted constructors. To do this I had toAlexis Hunt2011-05-173-0/+101
| | | | | | suppress an error we were previously emitting on valid union code. llvm-svn: 131440
* Fix crash on C++ code when compiling with -finstrument-functions.Ted Kremenek2011-05-161-0/+30
| | | | llvm-svn: 131435
* Emit complete-object constructors for abstract classes in kext mode forJohn McCall2011-05-161-0/+20
| | | | | | reasons that honestly really, really need to be looked into. llvm-svn: 131434
* Implement the new C++0x rules for non-trivial things in unions so thatAlexis Hunt2011-05-161-0/+22
| | | | | | my defaulted constructor tests stop yelling at me about them. llvm-svn: 131432
* Add test for PR9927.Rafael Espindola2011-05-161-0/+18
| | | | llvm-svn: 131403
* Revert 131377, 131369 and 131365.Rafael Espindola2011-05-162-74/+0
| | | | | | 131365 caused PR9927. llvm-svn: 131401
* Fix another regression from the "skip vtable pointer initialization"Anders Carlsson2011-05-163-6/+21
| | | | | | | optimization. Make sure to require a vtable when trying to get the address of a VTT, otherwise we would never end up emitting the VTT. llvm-svn: 131400
* Stop leaving a.out files around.John McCall2011-05-161-2/+2
| | | | llvm-svn: 131396
* Don't actually emit calls to the reserved global placement new and deleteJohn McCall2011-05-161-3/+49
| | | | | | | | | operators; their semantics are guaranteed by the language. If someone wants to argue that freestanding compiles shouldn't recognize this, I might be convinceable. llvm-svn: 131395
* Re-enable the fix for PR9181 now that all the edge cases are handled.Anders Carlsson2011-05-152-3/+82
| | | | llvm-svn: 131385
* When checking a set of template parameter lists against aDouglas Gregor2011-05-151-0/+10
| | | | | | | | | nested-name-specifier, re-evaluate the nested-name-specifier as if we were entering that context (which we did!), so that we'll resolve a template-id to a particular class template partial specialization. Fixes PR9913. llvm-svn: 131383
* The array-size operand to a new-expression is not necessarily a size_t.John McCall2011-05-151-2/+2
| | | | | | | It can be larger, it can be smaller, it can be signed, whatever. Handle all the crazy cases with grace and spirit. llvm-svn: 131378
* Disable the optimization until the bug noticed by Sean Hunt has been fixed.Anders Carlsson2011-05-152-1/+2
| | | | llvm-svn: 131372
* Fix generation of obj-c @encoding for members with zero size.Argyrios Kyrtzidis2011-05-151-0/+10
| | | | | | Also follow gcc in that arrays of elements with zero size are encoded as arrays with zero elements. llvm-svn: 131369
* When emitting the destructor for a class with a vtable, if we can determineAnders Carlsson2011-05-142-1/+107
| | | | | | | | | | that the destructor body is trivial and that all member variables also have either trivial destructors or trivial destructor bodies, we don't need to initialize the vtable pointers since no virtual member functions will be called on the destructor. Fixes PR9181. llvm-svn: 131368
* Only perform the null-initialization of an aggregate result of a messageJohn McCall2011-05-141-8/+20
| | | | | | | | | send if the receiver is null. Normally it's not worthwhile to check this, but avoiding the null-initialization is nice, and this also avoids nasty problems where the null-initialization is visible within the call because we use an aliased result buffer. rdar://problem/9402992 llvm-svn: 131366
* Create proper Objective-C @encoding for C++ classes; fixes rdar://9357400.Argyrios Kyrtzidis2011-05-142-0/+64
| | | | | | | | | | | | | | | | | | Go through and expand the members of bases into the encoding string (and encode the VTable as well). Unlike gcc which expands virtual bases as many times as they appear in the hierarchy, clang will only expand them once at the end, to reflect the actual layout. Note that there doesn't seem to be a way to indicate in the encoding that packing/alignment of members is different that normal, in which case the encoding will be out-of-sync with the real layout. If the runtime switches to just consider the size of types without taking into account alignment, we could easily make padding explicit in the encoding (e.g. using arrays of chars). The encoding strings would be longer then though. Also encode a flexible array member as array of 0 size, like gcc, not as a pointer. llvm-svn: 131365
* Emit an error when trying to @encode an incomplete type.Argyrios Kyrtzidis2011-05-141-0/+10
| | | | | | | | There are APIs, e.g. [NSValue valueWithBytes:objCType:], which use the encoding to find out the size of an object pointed to by a pointer. Make things safer by making it illegal to @encode incomplete types. llvm-svn: 131364
* Revert 131347. It asserts if the specialization in within a class template:Francois Pichet2011-05-141-7/+0
| | | | | | | | | | | | template<class U> struct X1 { template<class T> void f(T*); template<> void f(int*) { } }; Won't be so simple. I need to think more about it. llvm-svn: 131362
* In Microsoft mode, allow template function explicit specialization at class ↵Francois Pichet2011-05-141-0/+7
| | | | | | | | | | | | | | scope. Necessary to parse MFC and MSVC standard lib code. Example: struct X { template<class T> void f(T) { } template<> void f(int) { } } llvm-svn: 131347
* PR9908: Fix the broken fix for PR9902 to get the template argument lists in ↵Richard Smith2011-05-143-1/+109
| | | | | | | | the right order. Also, don't reject alias templates in all ElaboratedTypes: some ElaboratedTypes do not correspond to elaborated-type-specifiers. llvm-svn: 131342
OpenPOWER on IntegriCloud