summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* CodeGen: export typeinfo and typeinfo name on itaniumSaleem Abdulrasool2016-12-021-1/+20
| | | | | | | | When a C++ record is marked with dllexport mark both the typeinfo and the typeinfo name as being exported. Handle dllimport as the inverse. This applies to the itanium environment and not the MinGW environment. llvm-svn: 288546
* With LTO and profile-use, enable hotness info in opt remarksAdam Nemet2016-12-021-0/+5
| | | | | | | | | | This is to match the behavior of non-LTO; when -fsave-optimization-record is passed and PGO is available we enable the generation of hotness information in the optimization records. Differential Revision: https://reviews.llvm.org/D27332 llvm-svn: 288520
* [Frontend] Fix an issue where a quoted search path is incorrectlyAlex Lorenz2016-12-021-0/+12
| | | | | | | | | | | | | | | removed as a duplicate header search path The commit r126167 started passing the First index into RemoveDuplicates, but forgot to update 0 to First in the loop that looks for the duplicate. This resulted in a bug where an -iquoted search path was incorrectly removed if you passed in the same path into -iquote and more than one time into -isystem. rdar://23991350 Differential Revision: https://reviews.llvm.org/D27298 llvm-svn: 288491
* clang/test/Driver/defsym.s: Appease targeting msc. It is incapable of ↵NAKAMURA Takumi2016-12-021-1/+1
| | | | | | external assembler in trunk. llvm-svn: 288478
* [CUDA] Fix faulty test from rL288448Jason Henline2016-12-021-1/+1
| | | | | | | | | | | | | | | | | | Summary: The test introduced by rL288448 is currently failing because unimportant but unexpected errors appear as output from a test compile line. This patch looks for a more specific error message, in order to avoid false positives. Reviewers: jlebar Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27328 Switch to more specific error llvm-svn: 288453
* p0012r1: define corresponding feature test macroRichard Smith2016-12-021-2/+1
| | | | llvm-svn: 288452
* Recover better from an incompatible .pcm file being provided by -fmodule-file=.Richard Smith2016-12-021-0/+10
| | | | | | | | | | | We try to include the headers of the module textually in this case, still enforcing the modules semantic rules. In order to make that work, we need to still track that we're entering and leaving the module. Also, if the module was also marked as unavailable (perhaps because it was missing a file), we shouldn't mark the module unavailable -- we don't need the module to be complete if we're going to enter it textually. llvm-svn: 288449
* [CUDA] "Support" ASAN arguments in CudaToolChainJason Henline2016-12-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | This fixes a bug that was introduced in rL287285. The bug made it illegal to pass -fsanitize=address during CUDA compilation because the CudaToolChain class was switched from deriving from the Linux toolchain class to deriving directly from the ToolChain toolchain class. When CudaToolChain derived from Linux, it used Linux's getSupportedSanitizers method, and that method allowed ASAN, but when it switched to deriving directly from ToolChain, it inherited a getSupportedSanitizers method that didn't allow for ASAN. This patch fixes that bug by creating a getSupportedSanitizers method for CudaToolChain that supports ASAN. This patch also fixes the test that checks that -fsanitize=address is passed correctly for CUDA builds. That test didn't used to notice if an error message was emitted, and that's why it didn't catch this bug when it was first introduced. With the fix from this patch, that test will now catch any similar bug in the future. llvm-svn: 288448
* [libclang] Add APIs to check the result of an integer expression in ↵Argyrios Kyrtzidis2016-12-011-0/+14
| | | | | | | | | CXEvalResult without overflow Patch by Emilio Cobos Álvarez! See https://reviews.llvm.org/D26788 llvm-svn: 288438
* Add a space in a run line. NFC.George Burgess IV2016-12-011-1/+1
| | | | llvm-svn: 288414
* Send compiler output to /dev/null in defsym.s test.Artem Belevich2016-12-011-2/+2
| | | | | | Fixes test failures if tests are run in a read-only source tree. llvm-svn: 288406
* [CodeGen][ARM] Make sure the value and type used to create a bitcastAkira Hatanaka2016-12-011-0/+24
| | | | | | | | | | | have the same size. This fixes an asset that is triggered when an address of a boolean variable is passed to __builtin_arm_ldrex or __builtin_arm_strex. rdar://problem/29269006 llvm-svn: 288404
* [clang] Implement support for -defsym assembler optionMandeep Singh Grang2016-12-011-0/+22
| | | | | | | | | | | | | | | | | Summary: Adds support for -Wa,-defsym,abc=1 option. Related llvm patch: https://reviews.llvm.org/D26214 Reviewers: rafael, t.p.northover, colinl, echristo, compnerd, rengolin Subscribers: mehdi_amini Tags: #clang-c Differential Revision: https://reviews.llvm.org/D26213 llvm-svn: 288397
* [TableGen] Ignore fake args for parsing-related arg counts.George Burgess IV2016-12-011-0/+2
| | | | | | | | | | | | | | | | | | We should complain about the following: ``` void foo() __attribute__((unavailable("a", "b"))); ``` Instead, we currently just ignore "b". (...We also end up ignoring "a", because we assume elsewhere that this attribute can only have 1 or 0 args.) This happens because `unavailable` has a fake enum arg, and `AttributeList::{getMinArgs,getMaxArgs}` include fake args in their counts. llvm-svn: 288388
* [analyzer] Drop explicit mention of range constraint solverDominic Chen2016-12-0132-40/+40
| | | | | | | | | | | | Summary: The basic constraint solver was dropped in rL162384, leaving the range constraint solver as the default and only constraint solver. Explicitly specifying it is unnecessary, and makes it difficult to test with other solver backends. Reviewers: zaks.anna, dcoughlin Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26694 llvm-svn: 288372
* [ObjC] Avoid a @try/@finally/@autoreleasepool fixit when parsing an expressionAlex Lorenz2016-12-011-0/+28
| | | | | | | | | | | | This patch ensures that the typo fixit for the @try/@finally/@autoreleasepool {} directive is shown only when we're parsing an actual statement where such directives can actually be present. rdar://19669565 Differential Revision: https://reviews.llvm.org/D26916 llvm-svn: 288334
* [OpenCL] Refactor read_only/write_only pipes.Joey Gouly2016-12-011-0/+9
| | | | | | | | | | | This adds the access qualifier to the Pipe Type, rather than using a class hierarchy. It also fixes mergeTypes for Pipes, by disallowing merges. Only identical pipe types can be merged. The test case in invalid-pipes-cl2.0.cl is added to check that. llvm-svn: 288332
* Fix crash with unsupported architectures in Linux/Gnu target triples.Florian Hahn2016-12-011-0/+25
| | | | | | | | | | | | Summary: This patch adds a check and an error message to gnutools::Linker::ConstructJob in case the architecture is not supported. For most other operating systems, the error message is created in lib/Basic/Targets.cpp:AllocateTarget, but when construction the linker arguments for the gnutools linker a supported architecture is required. Reviewers: rafael, joerg, echristo Subscribers: mehdi_amini, joerg, dschuff, cfe-commits Differential Revision: https://reviews.llvm.org/D27066 llvm-svn: 288327
* P0012R1: add Itanium ABI support for throwing non-noexcept function pointers ↵Richard Smith2016-12-011-0/+23
| | | | | | and catching as noexcept. llvm-svn: 288305
* Revert r285664, cxx-abi-dev chose to go in a different direction for the ABI ↵Richard Smith2016-12-011-51/+0
| | | | | | here. llvm-svn: 288304
* PR31081: ignore exception specifications when deducing function templateRichard Smith2016-12-011-2/+46
| | | | | | | arguments from a declaration; despite what the standard says, this form of deduction should not be considering exception specifications. llvm-svn: 288301
* [OpenMP] Sema and parsing for 'teams distribute parallel for simd' pragmaKelvin Li2016-11-3021-7/+4597
| | | | | | | | This patch is to implement sema and parsing for 'teams distribute parallel for simd' pragma. Differential Revision: https://reviews.llvm.org/D27084 llvm-svn: 288294
* [Sema] Teach -Wcast-align to look at the aligned attribute of theAkira Hatanaka2016-11-301-0/+20
| | | | | | | | | | | | | declared variables. Teach Sema to check the aligned attribute attached to variable declarations so that it doesn't issue spurious warnings. rdar://problem/26517471 Differential revision: https://reviews.llvm.org/D21099 llvm-svn: 288267
* [analyzer] Construct temporary objects of correct types, destroy them properly.Artem Dergachev2016-11-301-0/+46
| | | | | | | | | | | | | | | | | | | | | | | When constructing a temporary object region, which represents the result of MaterializeTemporaryExpr, track down the sub-expression for which the temporary is necessary with a trick similar to the approach used in CodeGen, namely by using Expr::skipRValueSubobjectAdjustments(). Then, create the temporary object region with type of that sub-expression. That type would propagate further in a path-sensitive manner. During destruction of lifetime-extened temporaries, consult the type of the temporary object region, rather than the type of the lifetime-extending variable, in order to call the correct destructor (fixes pr17001) and, at least, not to crash by trying to call a destructor of a plain type (fixes pr19539). rdar://problem/29131302 rdar://problem/29131576 Differential Revision: https://reviews.llvm.org/D26839 llvm-svn: 288263
* [analyzer] SValExplainer: Support ObjC ivars and __block variables.Artem Dergachev2016-11-302-1/+28
| | | | | | | Additionally, explain the difference between normal and heap-based symbolic regions. llvm-svn: 288260
* [analyzer] Minor fixes and improvements to debug.ExprInspectionArtem Dergachev2016-11-302-0/+26
| | | | | | | | | | | | | | | | | | - Fix the bug with transition handling in ExprInspectionChecker's checkDeadSymbols implementation. - Test this bug by adding a new function clang_analyzer_numTimesReached() to catch number of passes through the code, which should be handy for testing against unintended state splits. - Add two more functions should help debugging issues quickly without running the debugger or dumping exploded graphs - clang_analyzer_dump() which dump()s an SVal argument to a warning message, and clang_analyzer_printState(), which dump()s the current program state to stderr. Differential Revision: https://reviews.llvm.org/D26835 llvm-svn: 288257
* make -fprofile-instr-generate and -fprofile-instr-use work with clang-clBob Haarman2016-11-301-0/+13
| | | | | | | | | Summary: Makes -fprofile-instr-generate and -fprofile-instr-use work with clang-cl so that profile-guided optimization can be used. Differential Revision: https://reviews.llvm.org/D27086 llvm-svn: 288230
* Switch CGObjCMac to use ConstantInitBuilder. Whew.John McCall2016-11-302-5/+4
| | | | | | | Not strictly NFC because I did change the order of emission of some global constants, but it shouldn't make any difference. llvm-svn: 288229
* Give this test that uses Itanium mangling a tripleReid Kleckner2016-11-301-2/+4
| | | | llvm-svn: 288222
* Stop handling interesting deserialized decls after HandleTranslationUnitReid Kleckner2016-11-301-0/+30
| | | | | | | | Other AST consumers can deserialize interesting decls that we might codegen, but they won't make it to the final object file and can trigger assertions in debug information generation after finalization. llvm-svn: 288221
* [c++1z] Improve support for -fno-exceptions: we can't just ignore exceptionRichard Smith2016-11-302-4/+4
| | | | | | | | | specifications in this mode in C++17, since they're part of the function type, so check and diagnose them like we would if exceptions were enabled. Better ideas welcome. llvm-svn: 288220
* [c++1z] PR31210: ignore exception specification when matching the type of aRichard Smith2016-11-291-0/+10
| | | | | | builtin with the type of an explicit declaration of the same function. llvm-svn: 288208
* Don't try to merge DLL attributes on redeclaration of invalid decl (PR31069)Hans Wennborg2016-11-291-0/+4
| | | | llvm-svn: 288207
* Support constant expression evaluation for wchar_t versions of simple stringRichard Smith2016-11-291-4/+99
| | | | | | functions, in order to support constexpr std::char_traits<wchar_t>. llvm-svn: 288193
* [OpenCL] Prevent generation of globals in non-constant AS for OpenCL.Anastasia Stulova2016-11-291-1/+20
| | | | | | | | | | Avoid using shortcut for const qualified non-constant address space aggregate variables while generating them on the stack such that the alloca object is used instead of a global variable containing initializer. Review: https://reviews.llvm.org/D27109 llvm-svn: 288163
* [OpenCL] Prohibit using reserve_id_t in program scope.Alexey Bader2016-11-293-1/+12
| | | | | | | | | | | | Patch by Egor Churaev (echuraev). Reviewers: Anastasia Subscribers: cfe-commits, yaxunl, bader Differential Revision: https://reviews.llvm.org/D27099 llvm-svn: 288126
* Add a warning for 'main' returning 'true' or 'false'.Richard Smith2016-11-291-0/+20
| | | | | | Patch by Joshua Hurwitz! llvm-svn: 288097
* Use ${:uid} to generate unique MS asm labels, not {:uid}Reid Kleckner2016-11-293-11/+11
| | | | llvm-svn: 288093
* [MS] Mangle a unique ID into all MS inline asm labelsReid Kleckner2016-11-283-12/+14
| | | | | | | | | | | | This solves PR23715 in a way that is compatible with LTO. MSVC supports jumping to source-level labels and between inline asm blocks, but we don't. Also revert the old solution, r255201, which was to mark these calls as noduplicate. llvm-svn: 288059
* [OPENMP] Fix for PR31137: Wrong DSA for members in struct.Alexey Bataev2016-11-281-17/+19
| | | | | | | | | If member expression is used in the task region and the base expression is a DeclRefExp and the variable used in this ref expression is private, it should be marked as implicitly firstprivate inside this region. Patch fixes this issue. llvm-svn: 288039
* [Sema] Set range end of constructors and destructors in template instantiationsMalcolm Parsons2016-11-281-0/+20
| | | | | | | | | | | | | | | | | | Summary: clang-tidy checks frequently use source ranges of functions. The source range of constructors and destructors in template instantiations is currently a single token. The factory method for constructors and destructors does not allow the end source location to be specified. Set end location manually after creating instantiation. Reviewers: aaron.ballman, rsmith, arphaman Subscribers: arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D26849 llvm-svn: 288025
* Adjust type-trait evaluation to properly handle Using(Shadow)DeclsHal Finkel2016-11-271-0/+12
| | | | | | | | | | | | | | | | Since r274049, for an inheriting constructor declaration, the name of the using declaration (and using shadow declaration comes from the using declaration) is the name of a derived class, not the base class (line 8225-8232 of lib/Sema/SemaDeclCXX.cpp in https://reviews.llvm.org/rL274049). Because of this, name-based lookup performed inside Sema::LookupConstructors returns not only CXXConstructorDecls but also Using(Shadow)Decls, which results assertion failure reported in PR29087. Patch by Taewook Oh, thanks! Differential Revision: https://reviews.llvm.org/D23765 llvm-svn: 287999
* [PPC] support for arithmetic builtins in the FEEhsan Amiri2016-11-244-8/+204
| | | | | | | | | | | | | | | | | | | | (commit again after fixing the buildbot failures) This adds various overloads of the following builtins to altivec.h: vec_neg vec_nabs vec_adde vec_addec vec_sube vec_subec vec_subc Note that for vec_sub builtins on 32 bit integers, the semantics is similar to what ISA describes for instructions like vsubecuq that work on quadwords: the first operand is added to the one's complement of the second operand. (As opposed to two's complement which I expected). llvm-svn: 287872
* [ASTDumper] Add some more character escapes for convenience.Benjamin Kramer2016-11-241-2/+2
| | | | llvm-svn: 287859
* Make these tests work more reliably with Release builds.Douglas Yung2016-11-242-761/+761
| | | | | | Differential Revision: https://reviews.llvm.org/D26827 llvm-svn: 287851
* [PPC] revert r287795Ehsan Amiri2016-11-234-210/+8
| | | | | | A test that passed locally is failing on one of the build bots. llvm-svn: 287796
* [PPC] support for arithmetic builtins in the FEEhsan Amiri2016-11-234-8/+210
| | | | | | | | | | | | | | | | | | | | (commit again after fixing the buildbot failures) This adds various overloads of the following builtins to altivec.h: vec_neg vec_nabs vec_adde vec_addec vec_sube vec_subec vec_subc Note that for vec_sub builtins on 32 bit integers, the semantics is similar to what ISA describes for instructions like vsubecuq that work on quadwords: the first operand is added to the one's complement of the second operand. (As opposed to two's complement which I expected). llvm-svn: 287795
* Add dllexport default ctor closure PCH regression test for PR31121Reid Kleckner2016-11-231-0/+26
| | | | | | Follow up to r287774 llvm-svn: 287793
* [Sema][Atomics] Treat expected pointer in compare exchange atomics as _NonnullAlex Lorenz2016-11-231-7/+12
| | | | | | | | | | | This commit teaches clang that is has to emit a warning when NULL is passed as the 'expected' pointer parameter into an atomic compare exchange call. rdar://18926650 Differential Revision: https://reviews.llvm.org/D26978 llvm-svn: 287776
* [PPC] Reverting r287772Ehsan Amiri2016-11-234-210/+8
| | | | | | Due to buildbot failure, I revert. Will recommit after investigation. llvm-svn: 287775
OpenPOWER on IntegriCloud