summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* PR21857: weaken an incorrect assertion.Richard Smith2015-02-112-2/+21
| | | | llvm-svn: 228785
* Emit landing pads for SEH even if nounwind is presentReid Kleckner2015-02-114-4/+9
| | | | | | | 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-102-9/+0
| | | | llvm-svn: 228739
* [analyzer] Pass actual state to alloc/dealloc handling functions.Anton Yartsev2015-02-101-43/+78
| | | | | | The state obtained from CheckerContext::getState() may be outdated by the time the alloc/dealloc handling function is called (e.g. the state was modified but the transition was not performed). State argument was added to all alloc/dealloc handling functions in order to get the latest state and to allow sequential calls to those functions. llvm-svn: 228737
* 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
* Add translationUnitDecl matcher.Samuel Benzaquen2015-02-104-31/+84
| | | | | | | | | | | | Summary: Add translationUnitDecl matcher. Reviewers: alexfh Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D7512 llvm-svn: 228694
* Fix __ldrexd arm intrinsic.James Molloy2015-02-101-1/+1
| | | | | | | | | | The parameter definition of this API is const volatile __int64*, but it is not defined correctly in clang. Move the 'CD' to the correct location. Bug tracked here: http://llvm.org/bugs/show_bug.cgi?id=21004 Patch by Daniel Jump! llvm-svn: 228678
* Do not force "-static" for aarch64 iOS kernel/kext assembly code.Bob Wilson2015-02-102-2/+5
| | | | | | | | | | | 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-109-58/+123
| | | | | | | | | 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-102-7/+19
| | | | llvm-svn: 228654
* [Static Analyzer] The name of the checker that reports a bug is addedGabor Horvath2015-02-0929-1/+268
| | | | | | | | | | | 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
* Be more conservative about gethostname()'s truncating behaviourBen Langmuir2015-02-091-1/+5
| | | | | | | | Don't assume it will provide an error or null-terminate the string on truncation, since POSIX doesn't guarantee either behaviour (although Linux and Darwin at least will do the 'right thing'). llvm-svn: 228613
* Diagnose timeouts in the LockFileManager and delete the dead lock fileBen Langmuir2015-02-092-2/+14
| | | | | | | | | | | | If the lock file manager times out, we should give an error rather than silently trying to load the existing module. And delete the (presumably) dead lock file, since it will otherwise prevent progress in future invokations. This is unsound since we have no way to prove that the lock file we are deleting is the same one we timed out on, but since the lock is only to avoid excessive rebuilding anyway it should be okay. Depends on llvm r228603. llvm-svn: 228604
* Update r228592 for when gethostname() returns an errorBen Langmuir2015-02-091-3/+3
| | | | | | | | | If gethostname() is not successful, just skip adding the hostname to the module hash. And don't bother setting hostname[255] = 0, since if gethostname() is successful, it will be null-terminated already (and if it's not successful we don't read the string now. llvm-svn: 228601
* Add missing include from r228592Ben Langmuir2015-02-091-0/+3
| | | | llvm-svn: 228594
* Add the hostname to the module hash to avoid sharing between hostsBen Langmuir2015-02-091-0/+10
| | | | | | | Sharing between hosts will cause problems for the LockFileManager, which can timeout waiting for a process that has already died. llvm-svn: 228592
* DebugInfo: Refactor default arg handling into a common place (instead of ↵David Blaikie2015-02-094-21/+18
| | | | | | handling in repeatedly for aggregate, complex, and scalar types) llvm-svn: 228591
* DebugInfo: Suppress the location of instructions in complex default arguments.David Blaikie2015-02-092-2/+17
| | | | llvm-svn: 228589
* DebugInfo: Suppress the location of instructions in aggregate default arguments.David Blaikie2015-02-092-0/+17
| | | | | | | | 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
* Update cxx_status to list features implemented in Clang 3.6.Benjamin Kramer2015-02-091-12/+12
| | | | | | | | | Still yellow because 3.6 is unreleased. While there make Urbana paper links clickable and list binary literals as available in Clang 2.9 (they've been available basically since the dawn of Clang, but not having a version number in the table looks weird) llvm-svn: 228571
* Sema: Don't give attribute alias vars with struct type an init exprDavid Majnemer2015-02-082-0/+5
| | | | | | | | | | 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
* clang-format: Correctly mark preprocessor lines in child blocks.Daniel Jasper2015-02-082-2/+8
| | | | | | | | | | | | | | | | | | | | | | This prevents contracting: auto lambda = []() { int a = 2 #if A + 2 #endif ; }; into: auto lambda = []() { int a = 2 #if A + 2 #endif ; }; Which is obviously BAD. This fixes llvm.org/PR22496. llvm-svn: 228522
* Replace DeclContext::getNextContext with DeclContext::collectAllContextsYaron Keren2015-02-071-5/+7
| | | | | | in the Clang CFE Internals Manual (done in r147729). llvm-svn: 228510
* CodeGen: Move DebugLocs.Benjamin Kramer2015-02-072-3/+3
| | | | | | | | It's slightly cheaper than copying it, if the DebugLoc points to replaceable metadata every copy is recorded in a DenseMap, moving reduces the peak size of that map. llvm-svn: 228492
* [modules] Treat friend declarations that are lexically within a dependentRichard Smith2015-02-0712-24/+83
| | | | | | | 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
* clang-format: Format Objective-C try blocks like all the other try blocks.Nico Weber2015-02-073-9/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: @try { // ... } @finally { // ... } Now: @try { // ... } @finally { // ... } This is consistent with how we format C++ try blocks and SEH try blocks. clang-format not doing this before was an implementation oversight. This is dependent on BraceBreakingStyle. The snippet above is with the Attach style. Style Stroustrip for example still results in the "Before:" snippet, which makes sense since other blocks (try, else) break after '}' too. llvm-svn: 228483
* Make the byte-shift SSE intrinsics emit vector shuffles which we know the ↵Filipe Cabecinhas2015-02-074-20/+88
| | | | | | | | | | | | | | | | 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-076-7/+22
| | | | | | DeclContext::noload_lookup. llvm-svn: 228475
* PR22405: don't lose implicit-deleted-ness across AST write / read.Richard Smith2015-02-062-14/+32
| | | | 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
* ASTUnit: Fix a name clash in GCC builds.Benjamin Kramer2015-02-061-2/+2
| | | | | | | Should fix the build. Looks like GCC 4.9 is using different scoping rules for range-based for loops. llvm-svn: 228424
* Inline asm IR input register constraints don't have early clobberEric Christopher2015-02-062-4/+14
| | | | | | | | 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
* ASTUnit: Use range-based for loops.Benjamin Kramer2015-02-062-92/+71
| | | | llvm-svn: 228420
* -iframework option should be forwarded to linkerSteven Wu2015-02-062-0/+12
| | | | | | | | | | | | | | | 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
* Make FileEntry::closeFile publicBen Langmuir2015-02-061-4/+4
| | | | | | | | If you request that the file manager not close your file immediately after reading, it's useful to be able to close it later to prevent a file descriptor leak. llvm-svn: 228407
* Revert "OpenCL: handle shift operator with vector operands"Tom Stellard2015-02-064-166/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update APIs that return a pair of iterators to return an iterator_range instead.Benjamin Kramer2015-02-0623-214/+135
| | | | | | Convert uses of those APIs into ranged for loops. NFC. llvm-svn: 228404
* [PowerPC] Re-disable linker optimizations for nowBill Schmidt2015-02-062-0/+9
| | | | 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-064-42/+166
| | | | | | | | | | | | | | | | | | | | 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-067-26/+65
| | | | | | | | | 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-063-2/+230
| | | | | | | | | | | 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
* Fix \param in r228276. [-Wdocumentation]NAKAMURA Takumi2015-02-051-1/+1
| | | | llvm-svn: 228355
* [modules] Refactor: unify the code that picks which declaration goes into aRichard Smith2015-02-052-55/+48
| | | | | | name lookup table. llvm-svn: 228354
* 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-0511-44/+216
| | | | | | | | | | | 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
* clang-format: Fix assert triggering on carriage returns.Daniel Jasper2015-02-052-0/+7
| | | | llvm-svn: 228288
* PR22465: when performing list-initialization for a class type C, if we see anRichard Smith2015-02-055-23/+60
| | | | | | | | | | 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-054-2/+113
| | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud