summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Diagnose when accessing property in a class method andFariborz Jahanian2010-12-031-0/+20
| | | | | | | no property accessor class method to be found, instead of crashing in IRGen. // rdar://8703553 llvm-svn: 120855
* Add test case for r120795.Ted Kremenek2010-12-031-0/+24
| | | | llvm-svn: 120796
* Fix diagnostic for reporting bad escape sequence.Ted Kremenek2010-12-031-0/+1
| | | | | | Patch by Paul Curtis! llvm-svn: 120759
* When we're performing an explicit cast of some sort, don't complainDouglas Gregor2010-12-023-6/+8
| | | | | | | | | about deprecated Objective-C pointer conversions. Plus, make sure to actually set an appropriate AssignmentAction when performing an implicit conversion from an InitializationSequence. Fixes regressions in the GCC DejaGNU testsuite. llvm-svn: 120744
* Improve on objc diagnostics. // rdar://8721692Fariborz Jahanian2010-12-021-2/+2
| | | | llvm-svn: 120737
* Merge transparent union types using member's unqualified typePeter Collingbourne2010-12-021-0/+4
| | | | llvm-svn: 120736
* Fix range in printf warnings for invalid conversion specifiers.Ted Kremenek2010-12-021-0/+1
| | | | llvm-svn: 120735
* Merge transparent union types using member's canonical param typePeter Collingbourne2010-12-021-0/+4
| | | | llvm-svn: 120729
* fix PR8726 by teaching the aggregate init optimization code to handle Chris Lattner2010-12-021-0/+13
| | | | | | structs with references in them correctly. llvm-svn: 120722
* Test for // rdar://8594790Fariborz Jahanian2010-12-021-0/+25
| | | | llvm-svn: 120717
* Attempt to fix linux buildbots by adding -ffreestanding for arm_neon tests.Bob Wilson2010-12-022-4/+4
| | | | | | | The arm_neon.h header includes stdint.h and it picks up the system header without -ffreestanding. llvm-svn: 120716
* IR Gen. part of API support for __block cxxFariborz Jahanian2010-12-022-6/+6
| | | | | | | | objects imported into blocks. //rdar://8594790. Will have a test case coming (as well as one sent to llvm test suite). llvm-svn: 120713
* Add a test for calling a Neon intrinsic macro with the wrong vector type.Bob Wilson2010-12-022-5/+13
| | | | | | | | This does not work so well with the -fno-lax-vector-conversions option for testing the arm_neon.h header but that is a really useful test, so I split this out to a separate Sema test to check for the warning. llvm-svn: 120694
* Improve codegen for initializer lists to use memset more aggressivelyChris Lattner2010-12-021-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when an initializer is variable (I handled the constant case in a previous patch). This has three pieces: 1. Enhance AggValueSlot to have a 'isZeroed' bit to tell CGExprAgg that the memory being stored into has previously been memset to zero. 2. Teach CGExprAgg to not emit stores of zero to isZeroed memory. 3. Teach CodeGenFunction::EmitAggExpr to scan initializers to determine whether they are profitable to emit a memset + inividual stores vs stores for everything. The heuristic used is that a global has to be more than 16 bytes and has to be 3/4 zero to be candidate for this xform. The two testcases are illustrative of the scenarios this catches. We now codegen test9 into: call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 400, i32 4, i1 false) %.array = getelementptr inbounds [100 x i32]* %Arr, i32 0, i32 0 %tmp = load i32* %X.addr, align 4 store i32 %tmp, i32* %.array and test10 into: call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 392, i32 8, i1 false) %tmp = getelementptr inbounds %struct.b* %S, i32 0, i32 0 %tmp1 = getelementptr inbounds %struct.a* %tmp, i32 0, i32 0 %tmp2 = load i32* %X.addr, align 4 store i32 %tmp2, i32* %tmp1, align 4 %tmp5 = getelementptr inbounds %struct.b* %S, i32 0, i32 3 %tmp10 = getelementptr inbounds %struct.a* %tmp5, i32 0, i32 4 %tmp11 = load i32* %X.addr, align 4 store i32 %tmp11, i32* %tmp10, align 4 Previously we produced 99 stores of zero for test9 and also tons for test10. This xforms should substantially speed up -O0 builds when it kicks in as well as reducing code size and optimizer heartburn on insane cases. This resolves PR279. llvm-svn: 120692
* Add support for the common and nocommon attributes.Eric Christopher2010-12-021-0/+9
| | | | | | rdar://8560647 llvm-svn: 120650
* FileCheckize.Eric Christopher2010-12-021-3/+7
| | | | llvm-svn: 120648
* FileCheckize.Eric Christopher2010-12-021-4/+4
| | | | llvm-svn: 120647
* Enhance the init generation logic to emit a memset followed by a few stores whenChris Lattner2010-12-021-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | a global is larger than 32 bytes and has fewer than 6 non-zero values in the initializer. Previously we'd turn something like this: char test8(int X) { char str[10000] = "abc"; into a 10K global variable which we then memcpy'd from. Now we generate: %str = alloca [10000 x i8], align 16 %tmp = getelementptr inbounds [10000 x i8]* %str, i64 0, i64 0 call void @llvm.memset.p0i8.i64(i8* %tmp, i8 0, i64 10000, i32 16, i1 false) store i8 97, i8* %tmp, align 16 %0 = getelementptr [10000 x i8]* %str, i64 0, i64 1 store i8 98, i8* %0, align 1 %1 = getelementptr [10000 x i8]* %str, i64 0, i64 2 store i8 99, i8* %1, align 2 Which is much smaller in space and also likely faster. This is part of PR279 llvm-svn: 120645
* Test use of arm_neon.h with -fno-lax-vector-conversions.Bob Wilson2010-12-021-0/+1
| | | | llvm-svn: 120642
* Add a testcase for Radar 8228022.Bob Wilson2010-12-021-0/+9
| | | | | | | Make sure the -Wvector-conversions does not cause unnecessary warnings when using Neon intrinsics with the correct types. llvm-svn: 120634
* Improve our handling of cv-qualifiers in Objective-C pointerDouglas Gregor2010-12-012-14/+32
| | | | | | | | | | | | | | | conversions. Previously, we would end up collapsing qualification conversions into the Objective-C pointer conversion step, including (possibly) stripping qualifiers that shouldn't be removed. This generalizes BuildSimilarlyQualifiedPointerType() to also work on Objective-C object pointers, then eliminates the (redundant, not totally correct) BuildSimilarlyQualifiedObjCObjectPointerType() function. Fixes <rdar://problem/8714395>. llvm-svn: 120607
* Not content to implement just "extern" explicit templateDouglas Gregor2010-12-011-0/+4
| | | | | | | | | instantiations, GCC also supports "inline" and "static" explicit template instantiations. Parse and warn about such constructs, but don't implement the semantics of either "inline" or "static". They don't seem to be widely used. llvm-svn: 120599
* After parsing a ':' in an enum-specifier within class context,Douglas Gregor2010-12-011-0/+18
| | | | | | | | | | disambiguate between an expression (for a bit-field width) and a type (for a fixed underlying type). Since the disambiguation can be expensive (due to tentative parsing), we perform a simplistic disambiguation based on one-token lookahead before going into the full-blown tentative parsing. Based on a patch by Daniel Wallin. llvm-svn: 120582
* Restore the lvalue-to-rvalue conversion patch with a minimal fix.John McCall2010-12-011-0/+11
| | | | llvm-svn: 120555
* test: add .cu extensionPeter Collingbourne2010-12-011-1/+1
| | | | llvm-svn: 120553
* Basic, Sema: add support for CUDA location attributesPeter Collingbourne2010-12-013-0/+13
| | | | llvm-svn: 120545
* Implement AST import support for class template specializations.Douglas Gregor2010-12-013-0/+37
| | | | llvm-svn: 120523
* When unknown method is sent to a receiver ofFariborz Jahanian2010-12-014-3/+13
| | | | | | | 'Class' type, disgnostic should refere to a class method. Fixes // rdar://8592156 llvm-svn: 120517
* Declaring local static in global blockFariborz Jahanian2010-11-301-0/+19
| | | | | | | literal declaration caused crash in CodeGen. This patch fixes it. pr8707 llvm-svn: 120486
* Follow through references to catch returned stack addresses, local blocks, ↵Argyrios Kyrtzidis2010-11-303-5/+91
| | | | | | | | | | | | label addresses or references to temporaries, e.g: const int& g2() { int s1; int &s2 = s1; // expected-note {{binding reference variable 's2' here}} return s2; // expected-warning {{reference to stack memory associated with local variable 's1' returned}} } llvm-svn: 120483
* Implement basic AST importing and merging support for class templateDouglas Gregor2010-11-303-0/+56
| | | | | | declarations. llvm-svn: 120448
* Add objc_getClass as an objc builtin functionFariborz Jahanian2010-11-301-0/+4
| | | | | | | (// rdar://8592641). Also rename LANGUAGEID to LanguageID. llvm-svn: 120437
* When using a precompiled preamble with detailed preprocessing records,Douglas Gregor2010-11-301-0/+6
| | | | | | | | | | trap the serialized preprocessing records (macro definitions, macro instantiations, macro definitions) from the generation of the precompiled preamble, then replay those when walking the list of preprocessed entities. This eliminates a bug where clang_getCursor() wasn't able to find preprocessed-entity cursors in the preamble. llvm-svn: 120396
* Fix bug in r120299 spotted by dgregor.Nico Weber2010-11-301-0/+18
| | | | llvm-svn: 120389
* Fix another case of giving the wrong value kind to a dependent cast toJohn McCall2010-11-301-0/+9
| | | | | | a non-dependent type. llvm-svn: 120384
* Replace \r\n with \n. No functional change.Nick Lewycky2010-11-301-99/+99
| | | | llvm-svn: 120379
* Revert r120331 since it causes spurious warnings and a possible assertion ↵Argyrios Kyrtzidis2010-11-292-10/+1
| | | | | | hit when self-host. llvm-svn: 120351
* Incomplete enum types not to be treated as integer typeFariborz Jahanian2010-11-291-0/+13
| | | | | | | when checking for integer signed/unsigned-ness. PR8694, // rdar://8707031 llvm-svn: 120345
* Emit warnings if we are returning a reference to a local temporary.Argyrios Kyrtzidis2010-11-292-1/+10
| | | | | | The issue was brought to our attention by Matthieu Monrocq. llvm-svn: 120331
* Always use a function's decl context when building default arguments. Fixes ↵Nico Weber2010-11-291-0/+33
| | | | | | http://http://llvm.org/pr8479. llvm-svn: 120299
* Revert r120063, it was wrong.John McCall2010-11-291-12/+3
| | | | llvm-svn: 120296
* Add a test for C++ [stmt.label]p1, from Sashan!Douglas Gregor2010-11-291-0/+25
| | | | llvm-svn: 120291
* test/CMakeLists.txt: Implement the target "check-all". For now, it has no ↵NAKAMURA Takumi2010-11-291-0/+10
| | | | | | dependencies. llvm-svn: 120280
* Revert parts of r120266 that I did not mean to commitNico Weber2010-11-281-33/+0
| | | | llvm-svn: 120267
* Minor whitespace and comment fixes. No functionality change.Nico Weber2010-11-281-0/+33
| | | | llvm-svn: 120266
* Look through parentheses when deciding whether an expr is a temporary ↵Anders Carlsson2010-11-281-0/+22
| | | | | | object. Fixes PR8683. llvm-svn: 120247
* Forgot a file in r120182Sebastian Redl2010-11-261-0/+14
| | | | llvm-svn: 120184
* Allow access to non-static members without an object in sizeof expressions, ↵Sebastian Redl2010-11-261-3/+3
| | | | | | in C++0x. Patch by Jakub Wieczorek. llvm-svn: 120182
* For internal consistency's sake, compute the value kind of a dependent castJohn McCall2010-11-261-0/+7
| | | | | | based on the known properties of the casted-to type. Fixes a crash on spirit. llvm-svn: 120180
* Regionstore: support derived-to-base cast by creating a CXXBaseObjectRegion.Zhongxing Xu2010-11-261-0/+15
| | | | llvm-svn: 120173
OpenPOWER on IntegriCloud