summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Don't refer to check.deps unless LLVM_INCLUDE_TESTS is enabledDouglas Gregor2011-07-151-2/+2
| | | | llvm-svn: 135300
* [analyzer] GNU __null is a pointer-sized integer, not a pointer. Fixes PR10372.Jordy Rose2011-07-151-0/+8
| | | | llvm-svn: 135294
* When creating a property in a class extension, make sure to check itsDouglas Gregor2011-07-151-0/+11
| | | | | | attributes. Fixes <rdar://problem/9561076>. llvm-svn: 135273
* Restore the C-style cast hack for enum template arguments,John McCall2011-07-151-0/+12
| | | | | | | | which is required given the current setup for template argument deduction substitution validation, and add a test case to make sure we don't break it in the future. llvm-svn: 135262
* Enhance the IR type lowering code to be much smarter about recursively loweringChris Lattner2011-07-151-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | types. Fore xample, we used to lower: struct bar { int a; }; struct foo { void (*FP)(struct bar); } G; to: %struct.foo = type { {}* } since the function pointer would cause recursive translation of bar and we didn't know if that would get us into trouble. We are now smart enough to know that it is fine, so we get this type instead: %struct.foo = type { void (i32)* } Codegen still needs to be prepared for uncooperative types at any place, which is why I let the maximally uncooperative code sit around for awhile to help shake out the bugs. llvm-svn: 135244
* Remove warnings of constant operands of logical operators from template ↵Richard Trieu2011-07-151-0/+22
| | | | | | | | | | | | | | instantiations. Upon instantiation of template, value-dependent parameters are replaced by equivalent literals, so code like: template<unsigned int A, unsigned int B> struct S { int foo() { int x = A && B; } } will not warn on A && B on every instantiation. This will still warn on other cases inside templates, which will be caught on checking the template definition. llvm-svn: 135222
* Fix false negative reported in PR 10358 by using 'Unknown' in ↵Ted Kremenek2011-07-141-4/+4
| | | | | | -Wuninitialized to avoid cascading warnings. Patch by Kaelyn Uhrain. llvm-svn: 135217
* [arcmt] Don't remove retains/releases on a global variable, flag them with ↵Argyrios Kyrtzidis2011-07-141-0/+6
| | | | | | errors. rdar://9402555. llvm-svn: 135213
* Revert 135177 to fix PR10363.Rafael Espindola2011-07-143-41/+71
| | | | | | | | Revert "For C++11, do more checking of initializer lists up-front, enabling some subset of the final functionality. C just leaves the function early. C++98 runs through the same code path, but has no changed functionality either." This reverts commit ac420c5053d6aa41d59f782caad9e46e5baaf2c2. llvm-svn: 135210
* [arcmt] Allow -retain of an __unsafe_unretained receiver if the result gets ↵Argyrios Kyrtzidis2011-07-141-0/+1
| | | | | | | | used. Keep the error if the result is unused. rdar://9552694. llvm-svn: 135209
* Teach -Wconversion, -Wsign-compare etc. about division and remainder.John McCall2011-07-141-0/+8
| | | | llvm-svn: 135208
* PR10359: Template declarations which define classes are not permitted to ↵Richard Smith2011-07-144-6/+26
| | | | | | | | | | | | also contain declarators. Previously we would accept code like this: template<typename T> struct S { } f() { return 0; } This case now produces a missing ';' diagnostic, since that seems like a much more likely error than an attempt to declare a function or variable in addition to the class template. Treat this llvm-svn: 135195
* [arcmt] Emit an error for unused -autorelease messages.Argyrios Kyrtzidis2011-07-144-6/+7
| | | | | | | | | | | An unused autorelease is badness. If we remove it the receiver will likely die immediately while previously it was kept alive by the autorelease pool. This is bad practice in general, so leave it and emit an error to force the user to restructure his code. rdar://9599884 llvm-svn: 135193
* For C++11, do more checking of initializer lists up-front, enabling some ↵Sebastian Redl2011-07-143-71/+41
| | | | | | | | | | subset of the final functionality. C just leaves the function early. C++98 runs through the same code path, but has no changed functionality either. This is a first baby step towards supporting generalized initializer lists. This also removes an aggregate test case that was just plain wrong, assuming that non-aggregates couldn't be initialized with initializer lists in C++11 mode. llvm-svn: 135177
* Fix problems Johannes noticed, and extend test cases further.Sebastian Redl2011-07-141-4/+58
| | | | llvm-svn: 135176
* Revert r135147 and r135075. The consensus was that this wasn't the right ↵Ted Kremenek2011-07-143-19/+4
| | | | | | thing to do. llvm-svn: 135152
* Update all of the libclang code corresponding to the preprocessorChandler Carruth2011-07-145-23/+23
| | | | | | | | | | | | | | MacroInstantiation -> MacroExpansion rename. Internally, everything is switched. Introduce a new cursor kind enum with the new name, but retain the old name as an alias so that we don't break backwards compatibility. Also update the debug printing routine to use 'macro expansions' as its explicitly not guaranteed to be stable, and mechanically switch the test cases over to that. llvm-svn: 135140
* Switch the diagnostic messages about macros to use the terms 'expanded'Chandler Carruth2011-07-143-37/+37
| | | | | | | | | and 'expansions' rather than 'instantiated' and 'contexts'. This is the first of several patches migrating Clang's terminology surrounding macros from 'instantiation' to 'expansion'. llvm-svn: 135135
* Reapply r135075, but modify format-strings.c and format-strings-fixit.c test ↵Ted Kremenek2011-07-143-4/+19
| | | | | | cases to be more portable with an explicit target triple. llvm-svn: 135134
* Revert r135075, "format string checking: long and int have the same widths ↵NAKAMURA Takumi2011-07-141-14/+0
| | | | | | | | on 32-bit, so we shouldn't warn about using" It fails on freebsd, mingw and msvc10. llvm-svn: 135129
* Add a hackaround to avoid the crash in PR10355. However, our recoveryDouglas Gregor2011-07-141-0/+11
| | | | | | | is still terrible here because typo correction is not behaving well in the presence of overloaded functions. llvm-svn: 135128
* [arcmt] Make sure migrating to ARC works even if '-fobjc-arc' is included in ↵Argyrios Kyrtzidis2011-07-145-0/+57
| | | | | | command-line flags. rdar://9567824 llvm-svn: 135115
* PR8800: When building a conversion to A& using a member operatorA&(), do not ↵Richard Smith2011-07-131-0/+14
| | | | | | require A to be a complete type. llvm-svn: 135101
* Reapply r134946 with fixes. Tested on Benjamin testcase and other test-suite ↵Bruno Cardoso Lopes2011-07-132-2/+17
| | | | | | failures. llvm-svn: 135091
* Fix an incorrect namespace typo-correction diagnostic, from KaelynDouglas Gregor2011-07-131-3/+14
| | | | | | Uhrain! Fixes PR10318. llvm-svn: 135086
* Emit debug info for extended vectors.Devang Patel2011-07-131-0/+5
| | | | llvm-svn: 135083
* format string checking: long and int have the same widths on 32-bit, so we ↵Ted Kremenek2011-07-131-0/+14
| | | | | | | | shouldn't warn about using an "int" format specifier with a "long" type in 32-bit. llvm-svn: 135075
* Enforce access control for the destructor in a new[] expression and markJohn McCall2011-07-132-0/+22
| | | | | | | it as used. Otherwise, we can fail to instantiate or validate the destructor, which can lead to crashes in IR gen like PR10351. llvm-svn: 135073
* [arcmt] Add weak/unsafe_unretained for "@property (readonly)" when we are ↵Argyrios Kyrtzidis2011-07-132-4/+6
| | | | | | @synthesizing it. llvm-svn: 135067
* [arcmt] For properties rewrite 'assign' -> 'weak or unsafe_unretained', ↵Argyrios Kyrtzidis2011-07-138-27/+29
| | | | | | | | 'retain' -> 'strong', and add 'weak or unsafe_unretained' when 'assign' is missing. rdar://9496219&9602589. llvm-svn: 135065
* With -Wselector, don't warn about unimplemented optional methodFariborz Jahanian2011-07-131-0/+25
| | | | | | | used in @selector expression because, well, their implementation is optional. // rdar://9545564 llvm-svn: 135057
* Don't crash if defining -dealloc in a category.John McCall2011-07-131-0/+10
| | | | llvm-svn: 135054
* In debugger mode, make ObjC message sends to unknown selectors returnJohn McCall2011-07-131-0/+14
| | | | | | | | | | __unknown_anytype, and rewrite such message sends correctly. I had to bite the bullet and actually add a debugger support mode for this one, which is a bit unfortunate, but there really isn't anything else I could imagine doing; this is clearly just debugger-specific behavior. llvm-svn: 135051
* objc++: Some level of covariance is allowed in ObjC properties.Fariborz Jahanian2011-07-132-2/+3
| | | | | | | Make it also available in ObjC++ propeties. Use common code for objc and objc++ so they don't diverge. // rdar://9740328 llvm-svn: 135050
* Re-relax conversion specifier checking for printf format strings and ↵Ted Kremenek2011-07-131-2/+2
| | | | | | conversion specifiers. My recent change was a mistake. llvm-svn: 135048
* Fix inversion in argument type checking for format strings with conversion ↵Ted Kremenek2011-07-131-0/+9
| | | | | | specifiers for character types. llvm-svn: 135046
* Okay, that rule about zero-length arrays applies to destroyingJohn McCall2011-07-133-7/+8
| | | | | | them, too. llvm-svn: 135038
* Arrays are permitted to be zero-length in some situations.John McCall2011-07-131-0/+11
| | | | llvm-svn: 135036
* Make the integer-range analysis recognize ^= correctly,John McCall2011-07-131-0/+15
| | | | | | | | | and (while I'm at it) teach it to grok the results of simple assignments. The first is PR10336. llvm-svn: 135034
* Convert the standard default-construction loops to use phis andJohn McCall2011-07-134-32/+69
| | | | | | partial destruction. llvm-svn: 135033
* PR10337 reminds me that calls return values, lets handle them justChris Lattner2011-07-131-0/+16
| | | | | | like arguments. Thanks PR10337! :) llvm-svn: 135030
* Eliminate an incomplete/incorrect attempt to provide support for C++0xDouglas Gregor2011-07-131-0/+16
| | | | | | | unrestricted unions, which ended up attempting to initialize objects in a union (which CodeGen isn't prepared for). Fixes PR9683. llvm-svn: 135027
* Silliness with commas, as reported at http://blog.regehr.org/archives/558 . ↵Eli Friedman2011-07-131-0/+1
| | | | | | As it turns out, this is my fault for not noticing this was an issue when I was looking at this a long time ago. :( llvm-svn: 135026
* Switch delete[] IR-generation over to the destroy framework,John McCall2011-07-132-30/+31
| | | | | | which implicitly makes it EH-safe as well. llvm-svn: 135025
* When compiling ::delete for a class with a virtual destructor, callDouglas Gregor2011-07-131-0/+19
| | | | | | | | the complete destructor and then invoke the global delete operator. Previously, we would invoke the deleting destructor, which calls the wrong delete operator. Fixes PR10341. llvm-svn: 135021
* revert fix for // rdar://9740328Fariborz Jahanian2011-07-121-0/+1
| | | | llvm-svn: 135010
* Revert r134946Bruno Cardoso Lopes2011-07-121-2/+2
| | | | llvm-svn: 135004
* [arcmt] Also avoid 'weak' for forward references to objc classes.Argyrios Kyrtzidis2011-07-122-4/+10
| | | | llvm-svn: 135003
* [arcmt] Before applying '__weak' check whether the objc class is annotated ↵Argyrios Kyrtzidis2011-07-122-14/+46
| | | | | | | | | | with objc_arc_weak_reference_unavailable or is in a list of classes not supporting 'weak'. rdar://9489367. llvm-svn: 135002
* objc++: Some level of covariance is allowed in ObjC properties.Fariborz Jahanian2011-07-121-0/+19
| | | | | | Make it also available in ObjC++ propeties. // rdar://9740328 llvm-svn: 135001
OpenPOWER on IntegriCloud