summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* PR21857: weaken an incorrect assertion.Richard Smith2015-02-111-0/+9
| | | | llvm-svn: 228785
* Emit landing pads for SEH even if nounwind is presentReid Kleckner2015-02-111-1/+1
| | | | | | | Disabling exceptions applies nounwind to lots of functions. SEH catches asynch exceptions, so emit the landing pad anyway. llvm-svn: 228769
* [PowerPC] Remove the --no-tls-optimize workaround from the clang driverBill Schmidt2015-02-101-2/+0
| | | | llvm-svn: 228739
* Check for backtraces in tests which are verifying pretty stack traces from a ↵Pete Cooper2015-02-104-2/+8
| | | | | | | | | | crashing clang. PrettyStackTrace now requires the ENABLE_BACKTRACES option. We need to check for that here or these tests fail llvm-lit. Reviewed by chandlerc llvm-svn: 228735
* [ARM] Add tests for armv6s[-]m being an alias to armv6[-]mBradley Smith2015-02-101-0/+2
| | | | llvm-svn: 228697
* Do not force "-static" for aarch64 iOS kernel/kext assembly code.Bob Wilson2015-02-101-0/+4
| | | | | | | | | | | Somehow a check for aarch64 was added to the Darwin toolchain's isKernelStatic function as part of the initial commit for Apple's arm64 target (r205100). That check was not in any of Apple's internal code and no one here knows where it came from. It has been harmless because "-static" does not change much, if anything, for arm64 iOS code, but it makes no sense to keep this check. llvm-svn: 228673
* [modules] When determining whether a name from a module replaces a name weRichard Smith2015-02-104-0/+9
| | | | | | | | | already have, check whether the name from the module is actually newer than the existing declaration. If it isn't, we might (say) replace a visible declaration with an injected friend, and thus make it invisible (or lose a default argument or an array bound). llvm-svn: 228661
* A temporary fix for backward compatibility breakages caused by PR12117.Larisse Voufo2015-02-101-3/+4
| | | | llvm-svn: 228654
* [Static Analyzer] The name of the checker that reports a bug is addedGabor Horvath2015-02-0928-0/+265
| | | | | | | | | | | to the plist output. This check_name field does not guaranteed to be the same as the name of the checker in the future. Reviewer: Anna Zaks Differential Revision: http://reviews.llvm.org/D6841 llvm-svn: 228624
* DebugInfo: Suppress the location of instructions in complex default arguments.David Blaikie2015-02-091-0/+9
| | | | llvm-svn: 228589
* DebugInfo: Suppress the location of instructions in aggregate default arguments.David Blaikie2015-02-091-0/+12
| | | | | | | | Matches the existing code for scalar default arguments. Complex default arguments probably need the same handling too (test/fix to that coming next). llvm-svn: 228588
* Sema: Don't give attribute alias vars with struct type an init exprDavid Majnemer2015-02-081-0/+3
| | | | | | | | | | We'd give the VarDecl a CXXConstructExpr even though it is annotated with an alias attribute. This would make us trip over sanity checking asserts. This fixes PR22493. llvm-svn: 228523
* [modules] Treat friend declarations that are lexically within a dependentRichard Smith2015-02-076-0/+20
| | | | | | | context as anonymous for merging purposes. They can't be found by their names, so we merge them based on their position within the surrounding context. llvm-svn: 228485
* Make the byte-shift SSE intrinsics emit vector shuffles which we know the ↵Filipe Cabecinhas2015-02-072-7/+40
| | | | | | | | | | | | | | | | backend can handle. Also removed unused builtins. Original patch by Andrea Di Biagio! Reviewers: craig.topper, nadav Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7199 llvm-svn: 228481
* [modules] Don't accidentally trigger deserialization from ↵Richard Smith2015-02-074-0/+15
| | | | | | DeclContext::noload_lookup. llvm-svn: 228475
* PR22405: don't lose implicit-deleted-ness across AST write / read.Richard Smith2015-02-061-0/+18
| | | | llvm-svn: 228464
* Make this test a little less specific by removing the argument thatEric Christopher2015-02-061-1/+1
| | | | | | could change. llvm-svn: 228438
* Inline asm IR input register constraints don't have early clobberEric Christopher2015-02-061-0/+11
| | | | | | | | modifiers on them. If we have a matching output constraint with an early clobber make sure we don't propagate that to the input constraint. llvm-svn: 228422
* -iframework option should be forwarded to linkerSteven Wu2015-02-061-0/+6
| | | | | | | | | | | | | | | Summary: -iframework option is used to specified System framework path so the path specified should be passed to linker as -F option rdar://problem/18234544 Reviewers: bob.wilson Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7106 llvm-svn: 228413
* Revert "OpenCL: handle shift operator with vector operands"Tom Stellard2015-02-062-94/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit r228382. This breaks the following case: Reported by Jeroen Ketema: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150202/122961.html typedef __attribute__((ext_vector_type(3))) char char3; void foo() { char3 v = {1,1,1}; char3 w = {1,2,3}; w <<= v; } If I compile with: clang -x cl file.c Then an error is produced: file.c:10:5: error: expression is not assignable w <<= v; ~ ^ 1 error generated. llvm-svn: 228406
* [PowerPC] Re-disable linker optimizations for nowBill Schmidt2015-02-061-0/+2
| | | | llvm-svn: 228402
* Added a test to check that exception flags are not passed by default on PS4.Andrea Di Biagio2015-02-061-0/+3
| | | | | | | | | | | | | This patch adds an extra test case to clang-exception-flags.cpp. No functional change intended. Patch by Wolfgang Pieb! Reviewers: filcab, alexr Differential Revision: http://reviews.llvm.org/D7298 llvm-svn: 228394
* OpenCL: handle shift operator with vector operandsSameer Sahasrabuddhe2015-02-062-41/+94
| | | | | | | | | | | | | | | | | | | | Introduce a number of checks: 1. If LHS is a scalar, then RHS cannot be a vector. 2. Operands must be of integer type. 3. If both are vectors, then the number of elements must match. Relax the requirement for "usual arithmetic conversions": When LHS is a vector, a scalar RHS can simply be expanded into a vector; OpenCL does not require that its rank be lower than the LHS. For example, the following code is not an error even if the implicit type of the constant literal is "int". char2 foo(char2 v) { return v << 1; } Consolidate existing tests under CodeGenOpenCL, and add more tests under SemaOpenCL. llvm-svn: 228382
* [modules] If a module declares an entity and then imports another declarationRichard Smith2015-02-065-6/+10
| | | | | | | | | of that entity, ensure that the redeclaration chain is reordered properly on reload. Otherwise, the result of name lookup for that entity may point to an entity that is too old; if that's an injected friend name or the like, that can result in the name not being found at all. llvm-svn: 228371
* Preprocessor: support __BIGGEST_ALIGNMENT__ macroTim Northover2015-02-061-0/+224
| | | | | | | | | | | For compatibility with GCC (and because it's generally helpful information otherwise inaccessible to the preprocessor). This appears to be canonically the alignment of max_align_t (e.g. on i386, __BIGGEST_ALIGNMENT__ is 4 even though vector types will be given greater alignment). Patch mostly by Mats Petersson llvm-svn: 228367
* Force an unknown target for the default case to make it work.Filipe Cabecinhas2015-02-051-1/+3
| | | | | | | | | | | | | | | Summary: This test was failing if LLVM_DEFAULT_TARGET_TRIPLE=x86_64-scei-ps4 due to its behavior for exceptions. Force an --unknown triple for the default case. Reviewers: echristo, chandlerc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7422 llvm-svn: 228337
* Re-land r228258 and make clang-cl's /EHs- disable -fexceptions againReid Kleckner2015-02-056-6/+146
| | | | | | | | | | | After r228258, Clang started emitting C++ EH IR that LLVM wasn't ready to deal with, even when exceptions were disabled with /EHs-. This time, make /EHs- turn off -fexceptions while still emitting exceptional constructs in functions using __try. Since Sema rejects C++ exception handling constructs before CodeGen, landingpads should only appear in such functions as the result of a __try. llvm-svn: 228329
* PR22465: when performing list-initialization for a class type C, if we see anRichard Smith2015-02-052-0/+20
| | | | | | | | | | initializer of the form {x}, where x is of type C or a type derived from C, perform *non-list* initialization of the entity from x, but create a CXXConstructExpr that knows that we used list-initialization syntax. Plus some fixes to ensure we mangle correctly in this and related cases. llvm-svn: 228276
* [OPENMP] Initial codegen for 'single' directive.Alexey Bataev2015-02-051-0/+46
| | | | | | | | | | | | | | | | This patch emits the following code for the single directive: #pragma omp single <body> <----> if(__kmpc_single(...)) { <body> __kmpc_end_single(...); } Differential Revision: http://reviews.llvm.org/D7045 llvm-svn: 228275
* Various fixes to mangling of list-initialization.Richard Smith2015-02-051-0/+26
| | | | llvm-svn: 228274
* [OPENMP] Codegen for 'taskyield' directiveAlexey Bataev2015-02-051-0/+39
| | | | | | | | | For 'taskyield' directive emit call to kmp_int32 __kmpc_omp_taskyield(ident_t *, kmp_int32 global_tid, int end_part); runtime function call with end_part arg set to 0 (it is ignored). Differential Revision: http://reviews.llvm.org/D7047 llvm-svn: 228272
* Revert r228258.Nico Weber2015-02-052-122/+1
| | | | | | | | | It caused a chromium base unittest that tests throwing and catching SEH exceptions to fail (http://crbug.com/455488) and I suspect it might also be the cause of the chromium clang win 64-bit shared release builder timing out during compiles. So revert to see if that's true. llvm-svn: 228262
* [PowerPC] Revert workaround for TLS linker bugBill Schmidt2015-02-051-2/+0
| | | | | | | | | | | | | | | | In r227480, Ulrich Weigand introduced a workaround for a linker optimization bug that can create mis-optimized code for accesses to general-dynamic or local-dynamic TLS variables. The linker optimization bug only occurred for Clang/LLVM because of some inefficient code being generated for these TLS accesses. I have recently corrected LLVM to produce the efficient code sequence expected by the linkers, so this workaround is no longer needed. Therefore this patch reverts r227480. I've tested that the previous bootstrap failure no longer occurs with the workaround reverted. llvm-svn: 228253
* [analyzer] Relax an assertion in VisitLvalArraySubscriptExprAnna Zaks2015-02-051-0/+16
| | | | | | | | | | | | The analyzer thinks that ArraySubscriptExpr cannot be an r-value (ever). However, it can be in some corner cases. Specifically, C forbids expressions of unqualified void type from being l-values. Note, the analyzer will keep modeling the subscript expr as an l-value. The analyzer should be treating void* as a char array (https://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Pointer-Arith.html). llvm-svn: 228249
* [analyzer] Do not crash in the KeychainAPI checker on user defined 'free()'.Anna Zaks2015-02-051-1/+1
| | | | llvm-svn: 228248
* [analyzer] Look for allocation site in the parent frames as well as the ↵Anna Zaks2015-02-051-5/+1178
| | | | | | | | | | | | | current one. Instead of handling edge cases (mostly involving blocks), where we have difficulty finding an allocation statement, allow the allocation site to be in a parent node. Previously we assumed that the allocation site can always be found in the same frame as allocation, but there are scenarios in which an element is leaked in a child frame but is allocated in the parent. llvm-svn: 228247
* Tweak clang/test/CodeGenCXX/debug-info-line.cpp for -Asserts.NAKAMURA Takumi2015-02-051-1/+1
| | | | | | | | | | | | CHECK: call {{.*}}src matched %call = invoke dereferenceable(4) i32* @_Z3srcv() I don't think it was intentional. llvm-svn: 228245
* Fix crash on finally blocks that don't fall throughReid Kleckner2015-02-051-0/+43
| | | | llvm-svn: 228243
* [modules] When using -E, we may try to merge decls despite having no SemaRichard Smith2015-02-044-3/+15
| | | | | | | | | | | object. In such a case, use the TU's DC for merging global decls rather than giving up when we find there is no TU scope. Ultimately, we should probably avoid all loading of decls when preprocessing, but there are other reasonable use cases for loading an AST file with no Sema object for which this is the right thing. llvm-svn: 228234
* Implement IRGen for SEH __finally and AbnormalTerminationReid Kleckner2015-02-043-13/+99
| | | | | | | | | | | Previously we would simply double-emit the body of the __finally block, but that doesn't work when it contains any kind of Decl, which we can't double emit. This fixes that by emitting the block once and branching into a shared code region and then branching back out. llvm-svn: 228222
* Catch more cases when diagnosing integer-constant-expression overflows.Josh Magee2015-02-043-0/+315
| | | | | | | | | When visiting AssignmentOps, keep evaluating after a failure (when possible) in order to identify overflow in subexpressions. Differential Revision: http://reviews.llvm.org/D1238 llvm-svn: 228202
* Thread Safety Analysis: support adopting of locks, as implemented inDeLesley Hutchins2015-02-041-32/+65
| | | | | | | | std::lock_guard. If EXCLUSIVE_LOCKS_REQUIRED is placed on the constructor of a SCOPED_LOCKABLE class, then that constructor is assumed to adopt the lock; e.g. the lock must be held on construction, and will be released on destruction. llvm-svn: 228194
* DebugInfo: Attribute cleanup code to the end of the scope, not the end of ↵David Blaikie2015-02-043-11/+23
| | | | | | | | | | | | | | | | | | the function. Now if you break on a dtor and go 'up' in your debugger (or you get an asan failure in a dtor) during an exception unwind, you'll have more context. Instead of all dtors appearing to be called from the '}' of the function, they'll be attributed to the end of the scope of the variable, the same as the non-exceptional dtor call. This doesn't /quite/ remove all uses of CurEHLocation (which might be nice to remove, for a few reasons) - it's still used to choose the location for some other work in the landing pad. It'd be nice to attribute that code to the same location as the exception calls within the block and to remove CurEHLocation. llvm-svn: 228181
* [analyzer] RetainCountChecker: be forgiving when ivars are accessed directly.Jordan Rose2015-02-042-2/+2124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A refinement of r204730, itself a refinement of r198953, to better handle cases where an object is accessed both through a property getter and through direct ivar access. An object accessed through a property should always be treated as +0, i.e. not owned by the caller. However, an object accessed through an ivar may be at +0 or at +1, depending on whether the ivar is a strong reference. Outside of ARC, we don't always have that information. The previous attempt would clear out the +0 provided by a getter, but only if that +0 hadn't already participated in other retain counting operations. (That is, "self.foo" is okay, but "[[self.foo retain] autorelease]" is problematic.) This turned out to not be good enough when our synthesized getters get involved. This commit drops the notion of "overridable" reference counting and instead just tracks whether a value ever came from a (strong) ivar. If it has, we allow one more release than we otherwise would. This has the added benefit of being able to catch /some/ overreleases of instance variables, though it's not likely to come up in practice. We do still get some false negatives because we currently throw away refcount state upon assigning a value into an ivar. We should probably improve on that in the future, especially once we synthesize setters as well as getters. rdar://problem/18075108 llvm-svn: 228174
* Port test/Driver/mg.c to use FileCheck instead of fgrepBen Langmuir2015-02-041-3/+3
| | | | | | Patch by İsmail Dönmez llvm-svn: 228164
* Update darwin-version testsSteven Wu2015-02-042-44/+62
| | | | | | | | | | | | | | | | | Summary: Now that the darwin-version tests in Driver and Frontend are testing different parts of the version encoding instead of doing duplicated work Reviewers: rnk Reviewed By: rnk Subscribers: rnk, cfe-commits Differential Revision: http://reviews.llvm.org/D7134 llvm-svn: 228159
* Allow to specify multiple -fsanitize-blacklist= arguments.Alexey Samsonov2015-02-041-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Allow user to provide multiple blacklists by passing several -fsanitize-blacklist= options. These options now don't override default blacklist from Clang resource directory, which is always applied (which fixes PR22431). -fno-sanitize-blacklist option now disables all blacklists that were specified earlier in the command line (including the default one). This change depends on http://reviews.llvm.org/D7367. Test Plan: regression test suite Reviewers: timurrrr Subscribers: cfe-commits, kcc, pcc Differential Revision: http://reviews.llvm.org/D7368 llvm-svn: 228156
* Tweak clang/test/CodeGenCXX/copy-constructor-elim.cpp to satisfy i686-linux.NAKAMURA Takumi2015-02-041-1/+1
| | | | llvm-svn: 228146
* Preserve early clobber flag when using named registers in inline assembly.Daniel Sanders2015-02-042-1/+25
| | | | | | | | | | | | | | | | Summary: Named registers with the constraint "=&r" currently lose the early clobber flag and turn into "=r" when converted to LLVM-IR. This patch correctly passes it on. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7346 llvm-svn: 228143
* Teaches the Clang driver to accept Cortex-A72Renato Golin2015-02-043-0/+34
| | | | | | | | | A previous commit added Cortex-A72 to LLVM, this teaches Clang to accept it as well. Patch by Ranjeet Singh. llvm-svn: 228141
OpenPOWER on IntegriCloud