summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* More diagnostic name fixups: w_ -> warn_, warning_ -> warn_, not_ -> note_.Richard Smith2016-12-024-8/+9
| | | | | | In passing, add a warning group for "ignored qualifier in inline assembly" warnings. llvm-svn: 288548
* CodeGen: export typeinfo and typeinfo name on itaniumSaleem Abdulrasool2016-12-021-6/+24
| | | | | | | | 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
* Mass-rename the handful of error_* diagnostics to err_*.Richard Smith2016-12-029-46/+46
| | | | llvm-svn: 288545
* [Sema] Reset a BumpPtrAllocator on clear(). NFC.George Burgess IV2016-12-021-0/+1
| | | | | | Looks like the reset() call was omitted by accident. llvm-svn: 288534
* With LTO and profile-use, enable hotness info in opt remarksAdam Nemet2016-12-021-7/+19
| | | | | | | | | | 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
* [CUDA] Forward sanitizer support to host toolchainJason Henline2016-12-021-6/+10
| | | | | | | | | | | | | | | | | | | | Summary: This is an improvement on rL288448 where address sanitization was listed as supported for the CudaToolChain. Since the intent is for the CudaToolChain not to reject any flags supported by the host compiler, this patch switches to forwarding the CudaToolChain sanitizer support to the host toolchain rather than explicitly whitelisting address sanitization. Thanks to hfinkel for this suggestion. Reviewers: jlebar Subscribers: hfinkel, cfe-commits Differential Revision: https://reviews.llvm.org/D27351 llvm-svn: 288512
* [ClangFormat] Only insert #include into the #include block in the beginning ↵Eric Liu2016-12-021-30/+100
| | | | | | | | | | | | | | | | | | of the file. Summary: This avoid inserting #include into: - raw string literals containing #include. - #if block. - Special #include among declarations (e.g. functions). Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D26909 llvm-svn: 288493
* [Frontend] Fix an issue where a quoted search path is incorrectlyAlex Lorenz2016-12-021-1/+1
| | | | | | | | | | | | | | | 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
* p0012r1: define corresponding feature test macroRichard Smith2016-12-021-1/+1
| | | | llvm-svn: 288452
* Recover better from an incompatible .pcm file being provided by -fmodule-file=.Richard Smith2016-12-022-9/+22
| | | | | | | | | | | 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-022-0/+11
| | | | | | | | | | | | | | | | | | | | | | 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
* [WebAssembly] Add an -mdirect flag for the direct wasm object feature.Dan Gohman2016-12-021-0/+4
| | | | | | | Add a target flag for enabling the new direct wasm object emission feature. llvm-svn: 288447
* Delete tautological assertion.Jonathan Roelofs2016-12-021-1/+0
| | | | | | | | After r256463, both the LHS and RHS now refer to the same variable. Before, they referred to the member, the parameter respectively. Now GCC6's -Wtautological-compare complains. llvm-svn: 288444
* Struct GEPs must use i32, not whatever size_t is. It should be safeJohn McCall2016-12-011-2/+4
| | | | | | | to do this unconditionally, given that the indices will always be small constant integers anyway. llvm-svn: 288440
* Extend CompilationDatabase by a field for the output filenameJoerg Sonnenberger2016-12-012-3/+10
| | | | | | | | | | | | | | In bigger projects like an Operating System, the same source code is often compiled in slightly different ways. This could be the difference between PIC and non-PIC code for static vs dynamic libraries, it could also be the difference between size optimised versions of tools for ramdisk images. At the moment, the compilation database has no way to distinguish such cases. As first step, add a field in the JSON format for it and process it accordingly. Differential Revision: https://reviews.llvm.org/D27138 llvm-svn: 288436
* [CodeGen][ARM] Make sure the value and type used to create a bitcastAkira Hatanaka2016-12-011-10/+20
| | | | | | | | | | | 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/+3
| | | | | | | | | | | | | | | | | 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
* swiftcc: Add an api to query whether a target ABI stores swifterror in a ↵Arnold Schwaighofer2016-12-013-0/+28
| | | | | | register llvm-svn: 288394
* Adds hasUnqualifiedDesugaredType to allow matching through type sugar.Manuel Klimek2016-12-011-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D27207 llvm-svn: 288366
* [ObjC] Avoid a @try/@finally/@autoreleasepool fixit when parsing an expressionAlex Lorenz2016-12-011-1/+6
| | | | | | | | | | | | 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-013-62/+21
| | | | | | | | | | | 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-3/+8
| | | | | | | | | | | | 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
* Teach ConstantBuilder how to emit a reference to the current positionJohn McCall2016-12-011-0/+40
| | | | | | that will be filled in when the initializer is set. llvm-svn: 288313
* P0012R1: add Itanium ABI support for throwing non-noexcept function pointers ↵Richard Smith2016-12-011-41/+42
| | | | | | 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-012-110/+4
| | | | | | here. llvm-svn: 288304
* PR31081: ignore exception specifications when deducing function templateRichard Smith2016-12-014-43/+89
| | | | | | | arguments from a declaration; despite what the standard says, this form of deduction should not be considering exception specifications. llvm-svn: 288301
* Clean up CGObjCMac's APIs for deriving class references. NFC.John McCall2016-11-303-115/+89
| | | | llvm-svn: 288295
* [OpenMP] Sema and parsing for 'teams distribute parallel for simd' pragmaKelvin Li2016-11-3013-15/+217
| | | | | | | | 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
* Introduce a type-safe enum for ForDefinition.John McCall2016-11-304-18/+30
| | | | llvm-svn: 288289
* Fix some layering violations where CGObjCMac's NSString emission wasJohn McCall2016-11-303-135/+127
| | | | | | | | | | performed at the CodeGenModule level. Would be NFC except we now also use a different uniquing structure so that we don't get spurious conflicts if you ask for both an NSString and a CFString for the same content (which is possible with builtins). llvm-svn: 288287
* Prospective MSVC workaround.John McCall2016-11-301-1/+2
| | | | llvm-svn: 288272
* Finish adopting ConstantInitBuilder in CGObjCGNU. NFC.John McCall2016-11-302-180/+187
| | | | llvm-svn: 288269
* [Sema] Teach -Wcast-align to look at the aligned attribute of theAkira Hatanaka2016-11-301-0/+22
| | | | | | | | | | | | | 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-30/+49
| | | | | | | | | | | | | | | | | | | | | | | 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] Minor fixes and improvements to debug.ExprInspectionArtem Dergachev2016-11-301-14/+91
| | | | | | | | | | | | | | | | | | - 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
* Prospective GCC build fix: the unelaborated form of this friendJohn McCall2016-11-301-2/+2
| | | | | | | declaration should find the right type, assuming it's supported evenly across all our hosts. llvm-svn: 288231
* Switch CGObjCMac to use ConstantInitBuilder. Whew.John McCall2016-11-302-778/+862
| | | | | | | 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
* Fix -Winconsistent-missing-override in CodeGenAction.cppReid Kleckner2016-11-301-1/+1
| | | | llvm-svn: 288227
* Fix formatting issue from r288207Hans Wennborg2016-11-301-1/+1
| | | | llvm-svn: 288223
* Stop handling interesting deserialized decls after HandleTranslationUnitReid Kleckner2016-11-301-0/+13
| | | | | | | | 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-41/+55
| | | | | | | | | 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-3/+19
| | | | | | 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/+3
| | | | llvm-svn: 288207
* getObjCEncodingForMethodDecl cannot fail. Simplify. NFC.John McCall2016-11-295-68/+45
| | | | llvm-svn: 288203
* Support constant expression evaluation for wchar_t versions of simple stringRichard Smith2016-11-292-30/+76
| | | | | | 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-2/+6
| | | | | | | | | | 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-291-50/+55
| | | | | | | | | | | | Patch by Egor Churaev (echuraev). Reviewers: Anastasia Subscribers: cfe-commits, yaxunl, bader Differential Revision: https://reviews.llvm.org/D27099 llvm-svn: 288126
* Removed DEBUG_TYPE from TokenAnalyzer.hKrasimir Georgiev2016-11-291-2/+0
| | | | | | | | | | | | | | Summary: Defining DEBUG_TYPE in a header file doesn't make sense. It is already defined in the corresponding source file. Reviewers: klimek, ioeric Subscribers: klimek Differential Revision: https://reviews.llvm.org/D27164 llvm-svn: 288125
* Correct comment: we are creating a canonicla decltypetype.Yaron Keren2016-11-291-1/+1
| | | | llvm-svn: 288124
* clang-format: [JS] Properly format dict literals that skip labels.Daniel Jasper2016-11-291-0/+3
| | | | llvm-svn: 288121
OpenPOWER on IntegriCloud