summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* OpenCL: Accept -cl-strict-aliasingMatt Arsenault2015-02-161-0/+1
| | | | | | | This was in 1.0, but deprecated in 1.1. Accept it and do nothing for compatability. llvm-svn: 229403
* Fix crash when clang tries to build NSNumber literal after forward declarationAlex Denisov2015-02-161-0/+18
| | | | | | | | | | | Bug report: http://llvm.org/bugs/show_bug.cgi?id=22561 Clang tries to create ObjCBoxedExpression of type 'NSNumber' when 'NSNumber' has only forward declaration, this cause a crash later, when 'Sema' refers to a nil QualType of the whole expression. Please, refer to the bug report for the better explanation. llvm-svn: 229402
* Fix quoting of #pragma comment for MS compat, clang part.Michael Kuperstein2015-02-161-1/+5
| | | | | | | | | For #pragma comment(linker, ...) MSVC expects the comment string to be quoted, but for #pragma comment(lib, ...) the compiler itself quotes the library name. Since this distinction disappears by the time the directive reaches the backend, move quoting for the "lib" version to the frontend. Differential Revision: http://reviews.llvm.org/D7653 llvm-svn: 229376
* DR1467: If aggregate initialization encounters an initializer list for whichRichard Smith2015-02-161-0/+7
| | | | | | | | subobject initialization is not possible, be sure to note the overall initialization as having failed so that overload resolution knows that the relevant candidate is not viable. llvm-svn: 229353
* [X86] Teach clang to lower __builtin_ia32_psrldqi256 and ↵Craig Topper2015-02-161-2/+2
| | | | | | __builtin_ia32_pslldqi256 to vector shuffles the backend recognizes. This is a step towards removing the corresponding intrinsics from the backend. llvm-svn: 229348
* Partial revert of r229336; this wasn't intended to go in.Aaron Ballman2015-02-154-84/+8
| | | | llvm-svn: 229338
* Removing LLVM_EXPLICIT, as MSVC 2012 was the last reason for requiring the ↵Aaron Ballman2015-02-154-8/+84
| | | | | | macro. NFC; Clang edition. llvm-svn: 229336
* Add more tests for crashes that happend to be fixed by r229288.Larisse Voufo2015-02-151-0/+214
| | | | llvm-svn: 229294
* Don't crash on `struct ::, struct ::` (and the same for enums).Larisse Voufo2015-02-151-214/+0
| | | | | | | | | | | | | | | | | | | The first part of that line doesn't parse correctly and ParseClassSpecifier() for some reason skips to tok::comma to recover, and then ParseDeclarationSpecifiers() sees the next struct and calls ParseClassSpecifier() again with the same DeclSpec object. However, the first call already called ActOnCXXGlobalScopeSpecifier() on the DeclSpec's CXXScopeSpec, and sema gets confused when this gets called again. As a fix, let ParseClassSpecifier() (and ParseEnumSpecifier()) call ParseOptionalCXXScopeSpec() with a temporary CXXScopeSpec object, and only copy it into the DeclSpec if things work out. (This is also how all the other functions that set the DeclSpec's TypeSpecScope set it.) Found by SLi's bot. llvm-svn: 229293
* More on fixing sized deallocation implementation logic: Fix PR21754.Larisse Voufo2015-02-151-0/+13
| | | | llvm-svn: 229291
* Add more tests for crashes that happend to be fixed by r229288.Nico Weber2015-02-151-0/+2
| | | | llvm-svn: 229289
* Don't crash on `struct ::, struct ::` (and the same for enums).Nico Weber2015-02-151-1/+9
| | | | | | | | | | | | | | | | | | | The first part of that line doesn't parse correctly and ParseClassSpecifier() for some reason skips to tok::comma to recover, and then ParseDeclarationSpecifiers() sees the next struct and calls ParseClassSpecifier() again with the same DeclSpec object. However, the first call already called ActOnCXXGlobalScopeSpecifier() on the DeclSpec's CXXScopeSpec, and sema gets confused when this gets called again. As a fix, let ParseClassSpecifier() (and ParseEnumSpecifier()) call ParseOptionalCXXScopeSpec() with a temporary CXXScopeSpec object, and only copy it into the DeclSpec if things work out. (This is also how all the other functions that set the DeclSpec's TypeSpecScope set it.) Found by SLi's bot. llvm-svn: 229288
* Remove trailing whitespace to make test compatible with typeless pointer ↵David Blaikie2015-02-151-1/+1
| | | | | | migration llvm-svn: 229274
* Remove trailing whitespace to make test compatible with typeless pointer ↵David Blaikie2015-02-151-2/+2
| | | | | | migration llvm-svn: 229273
* Remove trailing whitespace to make test compatible with typeless pointer ↵David Blaikie2015-02-151-1/+1
| | | | | | migration llvm-svn: 229272
* Remove trailing whitespace to help make test compatible with typeless ↵David Blaikie2015-02-151-1/+1
| | | | | | pointer migration llvm-svn: 229271
* Update test to be ready for typeless pointer changesDavid Blaikie2015-02-151-1/+1
| | | | llvm-svn: 229270
* Update test to make it robust to migration to typeless pointersDavid Blaikie2015-02-151-3/+3
| | | | llvm-svn: 229269
* ItaniumMangle: Correctly mangle <base-unresolved-name>David Majnemer2015-02-141-8/+32
| | | | | | | | | | We had two bugs: - We were missing the "on" prefix for unresolved operators. - We didn't handle the mangling of destructors at all. This fixes PR22584. llvm-svn: 229255
* Revise the implementation logic of sized deallocation: Do not automatically ↵Larisse Voufo2015-02-142-12/+20
| | | | | | | | generate weak definitions of the sized operator delete (in terms of unsized operator delete). Instead, provide the funcitonality via a new compiler flag, -fdef-sized-delete. The current implementation causes link-time ODR violations when the delete symbols are exported into the dynamic table. llvm-svn: 229241
* [modules] Accept //-style comments in module maps on purpose rather than byRichard Smith2015-02-141-0/+4
| | | | | | accident, and accept them even when they begin '//*'. llvm-svn: 229240
* Update cxx_dr_status to cover dr1748 and add test.Richard Smith2015-02-141-0/+35
| | | | llvm-svn: 229229
* DR1748: the reserved placement allocation functions have undefined behavior ifRichard Smith2015-02-142-11/+41
| | | | | | | they're given a null pointer as an argument, so we do not need to emit null checks on their results. llvm-svn: 229213
* CodeGen: _Atomic(_Complex) shouldn't crashDavid Majnemer2015-02-141-0/+8
| | | | | | | We could be a little kinder if we did a compare-exchange loop instead of an atomic-load/store pair. llvm-svn: 229212
* Revert "Revert r229082 for a bit, it caused PR22577."David Majnemer2015-02-143-10/+78
| | | | | | | This reverts commit r229123. It was a red herring, the bug was present without r229082. llvm-svn: 229205
* CodeGen: Correctly convert atomic bool from i8 to i1David Majnemer2015-02-141-0/+10
| | | | | | | | | Bools are a little tricky, they are i8 in memory and must be coerced back to i1 before further operations can be performed on them. This fixes PR22577. llvm-svn: 229204
* Update test case to be compatible with auto-migration to new getelementptr ↵David Blaikie2015-02-141-1/+1
| | | | | | | | | | | syntax coming in the near future The first change won't touch GEPOperators such as these, but the update script only identifies them by the leading '(' after getelementptr or 'getelementptr inbounds', so update this test to at least have those features to allow auto-migrating. llvm-svn: 229198
* Remove trailing whitespace getting in the way of near-future getelementptr ↵David Blaikie2015-02-141-1/+1
| | | | | | change updates llvm-svn: 229197
* Adjust test case to be compatible with future changes to explicitly pass the ↵David Blaikie2015-02-141-2/+2
| | | | | | type to getelementptr llvm-svn: 229196
* [modules] If we have a choice between including a file textually and importingRichard Smith2015-02-135-0/+19
| | | | | | a prebuilt form from a module, prefer the modular form, all else being equal. llvm-svn: 229188
* PR17938: This has already been fixed, add regression test.Richard Smith2015-02-131-0/+10
| | | | llvm-svn: 229146
* Revert r229082 for a bit, it caused PR22577.Nico Weber2015-02-133-78/+10
| | | | llvm-svn: 229123
* MS ABI: Implement /volatile:msDavid Majnemer2015-02-133-10/+78
| | | | | | | | | | | | The /volatile:ms semantics turn volatile loads and stores into atomic acquire and release operations. This distinction is important because volatile memory operations do not form a happens-before relationship with non-atomic memory. This means that a volatile store is not sufficient for implementing a mutex unlock routine. Differential Revision: http://reviews.llvm.org/D7580 llvm-svn: 229082
* [X86] Fix test cases that I foolishly copied and modified from another file ↵Craig Topper2015-02-131-4/+4
| | | | | | that had optimizations on. This caused the check patterns to not quite match. llvm-svn: 229073
* [X86] Add range checking on immediate arguments on XOP vpcom builtins.Craig Topper2015-02-131-0/+33
| | | | llvm-svn: 229067
* [X86] Add _mm_bslli_si128 and _mm_bsrli_si128 as aliases of _mm_slli_si128 ↵Craig Topper2015-02-131-0/+24
| | | | | | and _mm_srli_si128. This matches Intel documentation and gcc. llvm-svn: 229066
* Mark clang/test/CodeGen/exceptions-seh-leave.c as REQUIRES:asserts, for now.NAKAMURA Takumi2015-02-131-0/+3
| | | | | FIXME: Rewrite CHECKs for unnamed BBs and Insts. llvm-svn: 228990
* [modules] When collecting declarations to complete a redeclaration chain for anRichard Smith2015-02-125-4/+19
| | | | | | | | | | entity, put the originally-canonical decl IDs in the right places in the redecl chain rather than reordering them all to the start. If we don't ensure that the redecl chain order is consistent with the topological module order, we can fail to make a declaration visible if later declarations are in more IDNSs than earlier ones (for instance, because the earlier decls are invisible friends). llvm-svn: 228978
* [ms] Implement codegen for __leave.Nico Weber2015-02-121-9/+219
| | | | | | Reviewed at http://reviews.llvm.org/D7575 llvm-svn: 228977
* Mangle the IsSystem bit into the .pcm file nameBen Langmuir2015-02-121-0/+8
| | | | | | | | | When mangling the module map path into a .pcm file name, also mangle the IsSystem bit, which can also depend on the header search paths. For example, the user may change from -I to -isystem. This can affect diagnostics in the importing TU. llvm-svn: 228966
* Sema: Semantically check _Atomic-qualified pointersDavid Majnemer2015-02-121-2/+4
| | | | | | This fixes PR22568. llvm-svn: 228959
* Fix dependency generation crash test to run clang and clean up after itself.Greg Bedwell2015-02-121-1/+5
| | | | | | | | | | Previously the test did not have a RUN: prefix for the clang command. In addition it was leaving behind a tmp file with no permissions causing issues when deleting the build directory on Windows. Differential Revision: http://reviews.llvm.org/D7534 llvm-svn: 228919
* [mips] Partially revert r223927: Removing __SIZEOF_INT128__ macro for MIPS64Vasileios Kalintiris2015-02-121-2/+2
| | | | | | | | Partially revert r223927 because LLVM gained support for 128-bit integers in r227089. Modify and keep the tests that verify the definition of the macro __SIZEOF_INT128__ for MIPS64 BE & LE in the preprocessor. llvm-svn: 228918
* Fix tests so they work when the linker is gccFilipe Cabecinhas2015-02-123-8/+25
| | | | | | | | | | | If the linker is gcc (the default for Generic_ELF toolchains), we end up passing most of the arguments to the linker. Some tests were failing to account for this in their usage of *-NOT: lines and would fail if compiled with -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-unknown llvm-svn: 228902
* Add InlineAsmDiagnosticHandler for bitcode inputSteven Wu2015-02-121-0/+6
| | | | | | | | | | | | | | | | | | | | Summary: This patch installs an InlineAsmDiagnosticsHandler to avoid the crash report when the input is bitcode and the bitcode contains invalid inline assembly. The handler will simply print the same error message that will print from the backend. Add CHECK in test-case Reviewers: echristo, rafael Reviewed By: rafael Subscribers: rafael, cfe-commits Differential Revision: http://reviews.llvm.org/D7568 llvm-svn: 228898
* More for DR1467: In C++, when initializing an element of an aggregate,Richard Smith2015-02-122-2/+12
| | | | | | | | | always use the normal copy-initialization rules. Remove a special case that tries to stay within the list initialization checker here; that makes us do the wrong thing when list-initialization of an aggregate would not perform aggregate initialization. llvm-svn: 228897
* Improve the "braces around scalar init" warning to determine whether to warnRichard Smith2015-02-128-14/+13
| | | | | | | | based on whether "redundant" braces are ever reasonable as part of the initialization of the entity, rather than whether the initialization is "top-level". In passing, add a warning flag for it. llvm-svn: 228896
* Add the 'noinline' attribute to call sites within __try bodiesReid Kleckner2015-02-112-4/+9
| | | | | | | LLVM doesn't support non-call exceptions, so inlining makes it harder to catch such asynchronous exceptions. llvm-svn: 228876
* Fix REQUIRES lines on tests from r228735. Thanks Kristof for pointing out ↵Pete Cooper2015-02-112-2/+2
| | | | | | the missing commas llvm-svn: 228870
* Add a comdat to __clang_call_terminateReid Kleckner2015-02-111-2/+2
| | | | llvm-svn: 228863
OpenPOWER on IntegriCloud