summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* For -Wlogical-op-parentheses, point at '&&', not '||'. Fixes rdar://9125333.Argyrios Kyrtzidis2011-04-221-1/+2
| | | | llvm-svn: 130009
* I concur with DPG here. This does indeed apply in 0x mode. Added testChandler Carruth2011-04-221-0/+20
| | | | | | | | | cases that demonstrates exactly why this does indeed apply in 0x mode. If isPOD is currently broken in 0x mode, we should fix that directly rather than papering over it here. llvm-svn: 130007
* Don't enter a qualified scope for an invalid decl.Argyrios Kyrtzidis2011-04-221-0/+9
| | | | | | Fixes assertion later on. rdar://9122937 & http://llvm.org/PR9459 llvm-svn: 130006
* Add static analyzer support for C++'0X nullptr. Patch by Jim Goodnow II.Ted Kremenek2011-04-221-0/+41
| | | | llvm-svn: 130003
* In IsUserDefinedConversion try to recover from RequireCompleteType returning ↵Argyrios Kyrtzidis2011-04-221-0/+19
| | | | | | | | true. Fixes an assertion later on, rdar://9122862 & http://llvm.org/PR9460. llvm-svn: 130000
* PTX: Add default PTX calling conventionsJustin Holewinski2011-04-221-0/+9
| | | | llvm-svn: 129987
* Downgrade error "static declaration of 'foo' follows non-static declaration" ↵Francois Pichet2011-04-221-0/+12
| | | | | | to a warning in Microsoft mode. llvm-svn: 129985
* Add a testcase for svn r129964 (Neon load/store intrinsic alignments).Bob Wilson2011-04-221-0/+19
| | | | llvm-svn: 129979
* Fix crashing rdar://9122854 & http://llvm.org/PR9461.Argyrios Kyrtzidis2011-04-221-0/+32
| | | | llvm-svn: 129967
* Don't hide #warnings in a system header, same as gcc. Fixes rdar://8495837.Argyrios Kyrtzidis2011-04-212-0/+8
| | | | llvm-svn: 129951
* Add a fixit suggest for missing case keywords inside a switch scope. For ↵Richard Trieu2011-04-211-0/+124
| | | | | | | | | | | instance, in the following code, 'case ' will be suggested before the '1:' switch (x) { 1: return 0; default: return 1; } llvm-svn: 129943
* Driver/Darwin: Allow OS X deployment targets like 10.4.11, even though theyDaniel Dunbar2011-04-211-0/+8
| | | | | | can't be represented in the environment define. llvm-svn: 129939
* Fixit suggestion for adding missing tag name should have a space after the ↵Argyrios Kyrtzidis2011-04-211-0/+6
| | | | | | tag name. Fixes rdar://9295072 llvm-svn: 129917
* Have #pragma message not turn into error by -Werror, by default. Fixes ↵Argyrios Kyrtzidis2011-04-211-1/+1
| | | | | | rdar://9308989. llvm-svn: 129916
* PR9772: Fix the definition of WINT_MIN and WINT_MAX on Linux -ffreestanding.Eli Friedman2011-04-211-0/+6
| | | | llvm-svn: 129907
* The 0.98 revision of the x86-64 ABI clarified a lot of things, someJohn McCall2011-04-212-4/+35
| | | | | | | of which break strict compatibility with previous compilers. Implement one of them and then immediately opt out on Darwin. llvm-svn: 129899
* ForArgyrios Kyrtzidis2011-04-211-0/+14
| | | | | | | | | | | | | | double data[20000000] = {0}; we would blow out the memory by creating 20M Exprs to fill out the initializer. To fix this, if the initializer list initializes an array with more elements than there are initializers in the list, have InitListExpr store a single 'ArrayFiller' expression that specifies an expression to be used for value initialization of the rest of the elements. Fixes rdar://9275920. llvm-svn: 129896
* fix a crash on code that uses the result value of __builtin___memcpy_chk.Chris Lattner2011-04-201-0/+6
| | | | llvm-svn: 129892
* When translating a Clang source range into a libclang source range,Douglas Gregor2011-04-201-1/+9
| | | | | | | | adjust the a ending macro location to the end of the instantiation location before adjusting it to the end of the token. Fixes <rdar://problem/9021561>. llvm-svn: 129872
* PTX: Add PTX intrinsics as builtins and add ptx32 and ptx64 as valid ↵Justin Holewinski2011-04-201-0/+99
| | | | | | architectures for triples, e.g. ptx32-unknown-unknown llvm-svn: 129870
* Improve test case from prior commit ever so slightlyDouglas Gregor2011-04-201-0/+1
| | | | llvm-svn: 129866
* Fix a crash-on-invalid involving non-identifier names in a memberDouglas Gregor2011-04-201-0/+10
| | | | | | | access expression that appears to be a property reference. Fixes <rdar://problem/8985943>. llvm-svn: 129865
* TWEAKDaniel Dunbar2011-04-191-2/+2
| | | | llvm-svn: 129835
* Driver/Darwin: Switch to using new style triples.Daniel Dunbar2011-04-191-2/+2
| | | | llvm-svn: 129824
* Avoid superfluous warning after an error is detcted and reported.Fariborz Jahanian2011-04-191-2/+2
| | | | | | // rdar://9132143 llvm-svn: 129822
* We regard a function as 'unused' from the codegen perspective, so our ↵Argyrios Kyrtzidis2011-04-192-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | warnings diverge from gcc's unused warnings which don't get emitted if the function is referenced even in an unevaluated context (e.g. in templates, sizeof, etc.). Also, saying that a function is 'unused' because it won't get codegen'ed is somewhat misleading. - Don't emit 'unused' warnings for functions that are referenced in any part of the user's code. - A warning that an internal function/variable won't get emitted is useful though, so introduce -Wunneeded-internal-declaration which will warn if a function/variable with internal linkage is not "needed" ('used' from the codegen perspective), e.g: static void foo() { } template <int> void bar() { foo(); } test.cpp:1:13: warning: function 'foo' is not needed and will not be emitted static void foo() { } ^ Addresses rdar://8733476. llvm-svn: 129794
* Add a new expression classification, CL_AddressableVoidPeter Collingbourne2011-04-191-0/+11
| | | | | | | | | CL_AddressableVoid is the expression classification used for void expressions whose address can be taken, i.e. the result of [], * or void variable references in C, as opposed to things like the result of a void function call. llvm-svn: 129783
* Make the VariadicMethodTypeChecker accept block pointers as Objective-C ↵Anders Carlsson2011-04-191-0/+1
| | | | | | pointers. Fixes PR9746. llvm-svn: 129741
* Fix line endingsMatt Beaumont-Gay2011-04-191-40/+40
| | | | llvm-svn: 129740
* Fix a bug in calculation of composite typeFariborz Jahanian2011-04-181-0/+25
| | | | | | | | of conditional expressions of objc pointer types where one type is the immediate base type of the other. // rdar://9296866 llvm-svn: 129718
* Fix PR9741. The implicit declarations created for range-based for loops ↵Richard Smith2011-04-181-0/+8
| | | | | | weren't being added to the DeclContext (nor were they being marked as implicit). Also, the declarations were being emitted in the wrong order when building the CFG. llvm-svn: 129700
* When providing code completions of ivar names for a propertyDouglas Gregor2011-04-181-2/+23
| | | | | | | | | | | | | | | | implementation such as @synthesize Prop1 = Give priority to ivars whose type matches or closely matches the property type (as we do for several other kinds of results). Additionally, if there is an ivar with the same name as the property, or differs only due to a _ prefix or suffix, give that ivar a priority bump. Finally, verify that this search is properly returning ivars within class extensions and implementations (<rdar://problem/8488854>). llvm-svn: 129699
* When producing code completion results for the Objective-C propertyDouglas Gregor2011-04-181-2/+4
| | | | | | | | | | | implementation @synthesize <property> = also produce a completion for a to-be-synthesized ivar named _<property>. llvm-svn: 129697
* Put a typeid test in its own namespace.Anders Carlsson2011-04-171-1/+5
| | | | llvm-svn: 129681
* Fix a miscompilation I introduced in r129652, thanks for Eli for tracking Chris Lattner2011-04-171-0/+16
| | | | | | | | | | | | | | | it down. we effectively were compile the testcase into: void test14(int x) { switch (x) { case 11: break; case 42: test14(97); // fallthrough default: test14(42); break; which is not the same thing at all. This fixes a miscompilation of MallocBench/gs seen on the clang-x86_64-linux-fnt buildbot. llvm-svn: 129679
* Use the right type name.Anders Carlsson2011-04-171-1/+1
| | | | llvm-svn: 129674
* When laying out bases in, always try the "base subobject" LLVM type. If itAnders Carlsson2011-04-175-11/+41
| | | | | | | | | | | | | turns out that a field or base needs to be laid out in the tail padding of the base, CGRecordLayoutBuilder::ResizeLastBaseFieldIfNecessary will convert it to an array of i8. I've audited the new test results to make sure that they are still valid. I've also verified that we pass a self-host with this change. This (finally) fixes PR5589! llvm-svn: 129673
* Cleanup tests, no functionality change.Anders Carlsson2011-04-173-3/+4
| | | | llvm-svn: 129672
* when assertions are disabled, labels go away. Hopefully fixes the windows ↵Chris Lattner2011-04-171-4/+2
| | | | | | build. llvm-svn: 129660
* implement rdar://9289524 - case followed immediately by break results in ↵Chris Lattner2011-04-171-0/+15
| | | | | | | | empty IR block, a -O0 code quality issue. llvm-svn: 129652
* fold memcpy/set/move_chk to llvm.memcpy/set/move when the sizesChris Lattner2011-04-172-4/+28
| | | | | | | | | are trivial. This exposes opportunities earlier, and allows fastisel to do good things with these at -O0. This addresses rdar://9289468 - clang doesn't fold memset_chk at -O0 llvm-svn: 129651
* fix rdar://9289603 - clang should fold trivial ?: for enums as well as ↵Chris Lattner2011-04-161-1/+20
| | | | | | | | integer constants into select at -O0 by making the isCheapEnoughToEvaluateUnconditionally predicate handle anything that folds to a constant. In particular, we now fold enums. llvm-svn: 129649
* Modify test for 32 and 64 bit.Tanya Lattner2011-04-161-5/+5
| | | | llvm-svn: 129627
* Emit debug info for Objective-C properties.Devang Patel2011-04-161-0/+12
| | | | llvm-svn: 129625
* Fix bug in vector initializer when initializing a vector with another vector.Tanya Lattner2011-04-151-0/+12
| | | | | | Add test case. llvm-svn: 129617
* Enforce nonnull __attribute__ on Objective-C method calls.Fariborz Jahanian2011-04-151-0/+27
| | | | | | // rdar://9287695 llvm-svn: 129615
* Initial work to improve documentation for Clang's diagnostics, from Matthieu ↵Douglas Gregor2011-04-151-0/+5
| | | | | | Monrocq llvm-svn: 129614
* For the purposes of overload resolution, consider a conversion from anDouglas Gregor2011-04-151-0/+10
| | | | | | | | | Objective-C pointer to void* as a "conversion to void*". This allows us to prefer an Objective-C object pointer conversion to a superclass object pointer over an Objective-C object pointer conversion to cv-void*. Fixes PR9735. llvm-svn: 129603
* Forbid the use of C++ new/delete to allocate/free objects within anDouglas Gregor2011-04-151-0/+24
| | | | | | | | | | address space. I could see that this functionality would be useful, but not in its current form (where the address space is ignored): rather, we'd want to encode the address space into the parameter list passed to operator new/operator delete somehow, which would require a bunch more semantic analysis. llvm-svn: 129593
* Fixes a crash when generating dependency file stuffFariborz Jahanian2011-04-151-0/+4
| | | | | | and output file is not writable. // rdar://9286457. llvm-svn: 129587
OpenPOWER on IntegriCloud