summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Revert r255001, "Add parse and sema for OpenMP distribute directive and all ↵NAKAMURA Takumi2015-12-0929-1455/+23
| | | | | | | | its clauses excluding dist_schedule." It causes memory leak. Some tests in test/OpenMP would fail. llvm-svn: 255094
* [Basic] Rangify two for loops. NFC.Vedant Kumar2015-12-091-4/+4
| | | | llvm-svn: 255091
* [PPC64, TSAN] Enable thread sanitizer for PPC64Bill Schmidt2015-12-081-1/+1
| | | | | | | | Patch by Simone Atzeni. This enables the -fsanitize=thread flag for PPC64 and PPC64LE. llvm-svn: 255067
* Objective-C properties: fix bogus use of "isa<>" on a QualType.Douglas Gregor2015-12-082-6/+15
| | | | | | | | | The code used "isa" to check the type and then "getAs" to look through sugar; we need to look through the sugar when checking, too, otherwise any kind of sugar (nullability qualifiers in the example; or a typedef) will thwart this semantic check. Fixes rdar://problem/23804250. llvm-svn: 255066
* Module file extensions: pass a Sema through to the extension writer.Douglas Gregor2015-12-085-8/+14
| | | | | | | | Module file extensions are likely to need access to Sema/Preprocessor/ASTContext, and cannot get it through other sources. llvm-svn: 255065
* [Sema] Add warning when comparing nonnull and nullGeorge Burgess IV2015-12-084-37/+69
| | | | | | | | | | | | | | | | | | Currently, we emit warnings in some cases where nonnull function parameters are compared against null. This patch extends this support to warn when comparing the result of `returns_nonnull` functions against null. More specifically, we will now warn cases like: int *foo() __attribute__((returns_nonnull)); int main() { if (foo() == NULL) {} // warning: will always evaluate to false } Differential Revision: http://reviews.llvm.org/D15324 llvm-svn: 255058
* [X86][AVX2] Stripped backend codegen testsSimon Pilgrim2015-12-081-207/+1
| | | | | | | | As discussed on the ml, backend tests need to be put in llvm/test/CodeGen/X86 as fast-isel tests using IR that is as close to what is generated here as possible. The llvm tests will (re)added in a future commit. llvm-svn: 255050
* Use range loops and autos in utils/TableGen/ClangAttrEmitter.cpp and ↵Eugene Zelenko2015-12-081-21/+17
| | | | | | | | generated code. Differential revision: http://reviews.llvm.org/D15313 llvm-svn: 255042
* Use range loops and autos in lib/Serialization/ASTWriter.cpp.Eugene Zelenko2015-12-081-127/+103
| | | | | | Differential revision: http://reviews.llvm.org/D15311 llvm-svn: 255033
* Update clang-format-vs READMEHans Wennborg2015-12-081-3/+4
| | | | | | VS2013 is requried after r231084. llvm-svn: 255029
* [x86][avx512] more changes in intrinsics to be align with gcc formatAsaf Badouh2015-12-083-24/+24
| | | | | | Differential Revision: http://reviews.llvm.org/D15328 llvm-svn: 255012
* [OPENMP 4.5] Parsing/sema for 'num_tasks' clause.Alexey Bataev2015-12-0821-12/+406
| | | | | | OpenMP 4.5 adds directives 'taskloop' and 'taskloop simd'. These directives support clause 'num_tasks'. Patch adds parsing/semantic analysis for this clause. llvm-svn: 255008
* Replace bitwise AND with logical AND in an expression that already had ↵Craig Topper2015-12-081-1/+1
| | | | | | another logical AND. NFC llvm-svn: 255006
* [Sema] Remove tab characters. NFCCraig Topper2015-12-081-2/+2
| | | | llvm-svn: 255004
* Add parse and sema for OpenMP distribute directive and all its clauses ↵Carlo Bertolli2015-12-0829-23/+1455
| | | | | | excluding dist_schedule. llvm-svn: 255001
* Explicitly permit undefined behavior in constant initializers for globalRichard Smith2015-12-089-21/+79
| | | | | | | | variables in C, in the cases where we can constant-fold it to a value regardless (such as floating-point division by zero and signed integer overflow). Strictly enforcing this rule breaks too much code. llvm-svn: 254992
* Replace a bunch of duplicate conditions with the call from types::.Eric Christopher2015-12-081-10/+4
| | | | llvm-svn: 254986
* Remove name from FIXME.Eric Christopher2015-12-081-1/+1
| | | | llvm-svn: 254985
* Update comment to reflect that we use other tools via the toolchain toEric Christopher2015-12-081-1/+1
| | | | | | handle more than just C. llvm-svn: 254984
* [diagnostics] Avoid crashes while printing macro backtracesReid Kleckner2015-12-082-19/+90
| | | | | | | | | | | | | | | | | | | When attempting to map a source into a given level of macro expansion, this code was ignoring the possibility that the start and end of the range might take wildly different paths through the tree of macro expansions. It was assuming that the begin spelling location would always precede the end spelling location, which is false. A macro can easily transpose its arguments. This also fixes a related issue where there are extra macro arguments between the begin location and the end location. In this situation, we now highlight the entire macro invocation. Pair programmed with Richard Smith. Fixes PR12818. llvm-svn: 254981
* 80-column fixup.Eric Christopher2015-12-081-1/+2
| | | | llvm-svn: 254973
* Update comment.Eric Christopher2015-12-081-2/+2
| | | | llvm-svn: 254972
* [analyzer] Fix crash when lambda captures a variable-length array.Devin Coughlin2015-12-072-3/+30
| | | | | | | | | | | | When a C++ lambda captures a variable-length array, it creates a capture field to store the size of the array. The initialization expression for this capture is null, which led the analyzer to crash when initializing the field. To avoid this, use the size expression from the VLA type to determine the initialization value. rdar://problem/23748072 llvm-svn: 254962
* Add llvm-objdump to compiler-rt test deps.Alexey Samsonov2015-12-071-1/+1
| | | | llvm-svn: 254961
* 80-col and whitespace fixups.Eric Christopher2015-12-071-9/+12
| | | | llvm-svn: 254958
* Remove target specifier from new testsTeresa Johnson2015-12-072-7/+7
| | | | | | | | | Hopefully fix the remaining bot failure from r254927. Remove target specification since it shouldn't be needed, and this causes an error when trying to check the pass execution structure in test/CodeGen/thinlto_backend.c on non-x86 arches. llvm-svn: 254940
* Adjust test to fix bot error from r254927.Teresa Johnson2015-12-071-1/+1
| | | | | | Remove the part of the error message that may vary across systems. llvm-svn: 254938
* AST: defer to TypeLoc::copy in TypeLoc::initializeFullCopyJustin Bogner2015-12-071-5/+4
| | | | | | | | | | | | | | | | If we're initializing a TypeLoc from one that's been allocated with different alignment, memcpy will get the padding wrong. The `copy` method already checks and handles this case, so we should just defer to it. This also drops the `const` off of the `initializeFullCopy` declarations, since it isn't even remotely true (and the compiler notices when we try to call copy() instead of tricking it with memcpy). Fixes llvm.org/pr23516. llvm-svn: 254935
* clang-format: Make wrapping after "./->" cheaper, even if the elementDaniel Jasper2015-12-072-8/+28
| | | | | | | | | | | | | | | | | | | before it is not a closing parenthesis. Otherwise, this frequently leads to "hanging" indents that users perceive as "weird". Before: return !soooooooooooooome_map.insert( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) .second; After: return !soooooooooooooome_map .insert(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) .second; llvm-svn: 254933
* [ThinLTO] Option to invoke ThinLTO backend passes and importingTeresa Johnson2015-12-0712-57/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Adds new option -fthinlto-index=<file> to invoke the LTO pipeline along with function importing via clang using the supplied function summary index file. This supports invoking the parallel ThinLTO backend processes in a distributed build environment via clang. Additionally, this causes the module linker to be invoked on the bitcode file being compiled to perform any necessary promotion and renaming of locals that are exported via the function summary index file. Add a couple tests that confirm we get expected errors when we try to use the new option on a file that isn't bitcode, or specify an invalid index file. The tests also confirm that we trigger the expected function import pass. Depends on D15024 Reviewers: joker.eph, dexonsmith Subscribers: joker.eph, davidxl, cfe-commits Differential Revision: http://reviews.llvm.org/D15025 llvm-svn: 254927
* [avx512] rename gcc intrinsics to be align with gcc formatAsaf Badouh2015-12-072-72/+72
| | | | | | | | rename the gcc intrinsics suffix : _mask ->_round Differential Revision: http://reviews.llvm.org/D15284 llvm-svn: 254906
* [OPENMP 4.5] parsing/sema support for 'grainsize' clause.Alexey Bataev2015-12-0718-10/+342
| | | | | | OpenMP 4.5 adds 'taksloop' and 'taskloop simd' directives, which have 'grainsize' clause. Patch adds parsing/sema analysis of this clause. llvm-svn: 254903
* [OPENMP 4.5] parsing/sema support for 'nogroup' clause.Alexey Bataev2015-12-0718-9/+100
| | | | | | OpenMP 4.5 adds 'taskloop' and 'taskloop simd' directives. These directives have new 'nogroup' clause. Patch adds basic parsing/sema support for this clause. llvm-svn: 254899
* Fix PR20334: invalid assertion while diagnosing list initialization failureFaisal Vali2015-12-072-1/+23
| | | | | | | | | | | | | https://llvm.org/bugs/show_bug.cgi?id=20334 Unfortunately, clang currently checks for a certain brokenness of implementations of std::initializer_list in CodeGen (void AggExprEmitter::VisitCXXStdInitializerListExpr), not in SemaInit. Until that is fixed, make sure we don't let broken attempts that are aggregates leak through into sema, which allows maintenance of expected invariants, and avoids triggering an assertion. llvm-svn: 254889
* [PGO] Instrument only base constructors and destructors.Serge Pavlov2015-12-069-34/+67
| | | | | | | | | | | | | | | | Constructors and destructors may be represented by several functions in IR. Only base structors correspond to source code, others are small pieces of code and eventually call the base variant. In this case instrumentation of non-base structors has little sense, this fix remove it. Now profile data of a declaration corresponds to exactly one function in IR, it agrees with the current logic of the profile data loading. This change fixes PR24996. Differential Revision: http://reviews.llvm.org/D15158 llvm-svn: 254876
* Use llvm::make_range to reduce mentions of iterator type. NFCCraig Topper2015-12-064-12/+7
| | | | llvm-svn: 254870
* Fix crash in ASTDumper when dumping NamedDecl with NULL getQualifier().Dawn Perchik2015-12-051-3/+6
| | | | | | | | Reviewed by: aaron.ballman Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15254 llvm-svn: 254867
* [X86][3DNow!] Stripped backend codegen testsSimon Pilgrim2015-12-051-26/+0
| | | | | | | | As discussed on the ml, backend tests need to be put in llvm/test/CodeGen/X86 as fast-isel tests using IR that is as close to what is generated here as possible. The llvm tests will (re)added in a future commit llvm-svn: 254849
* Updated test names to match the intrinsics being testedSimon Pilgrim2015-12-052-14/+14
| | | | llvm-svn: 254848
* [X86][F16C] Stripped backend codegen testsSimon Pilgrim2015-12-051-6/+4
| | | | | | | | | | As discussed on the ml, backend tests need to be put in llvm/test/CodeGen/X86 as fast-isel tests using IR that is as close to what is generated here as possible. The llvm tests will (re)added in a future commit I will update PR24580 on this new plan llvm-svn: 254847
* [AST] Use std::copy and std::fill to simplify some memcpy and memset calls. ↵Craig Topper2015-12-051-5/+7
| | | | | | Also const-correct some methods being used since the std::copy catches the mismatch where memcpy didn't. llvm-svn: 254846
* Use std::copy and std::transform instead of manual loops. NFCCraig Topper2015-12-051-17/+16
| | | | llvm-svn: 254845
* Pass profile version info to name API (NFC)Xinliang David Li2015-12-051-1/+4
| | | | llvm-svn: 254839
* Revert "[x86] Exclusion of incorrect include headers paths for MCU target"Reid Kleckner2015-12-052-57/+20
| | | | | | | | | | This reverts commit r254195. From the description, I suspect that the wrong patch was committed here, and this is causing assertion failures in EmitDeferred() when the global value ends up being a bitcast of a global. llvm-svn: 254823
* [WebAssembly] Remove an obsolete TODO comment.Dan Gohman2015-12-051-1/+0
| | | | llvm-svn: 254817
* [analyzer] Fix MemRegion crash casting non-struct to derived struct (PR25426).Devin Coughlin2015-12-052-13/+27
| | | | | | | | | | This commit prevents MemRegion::getAsOffset() from crashing when the analyzed program casts a symbolic region of a non-record type to some derived type and then attempts to access a field of the base type. rdar://problem/23458069 llvm-svn: 254806
* [Docs] One more cleanup of -fsanitize= section.Alexey Samsonov2015-12-042-18/+17
| | | | | | | Describe -fsanitize-blacklist flags in separate paragraphs, move notes about importance of clang++ for vptr down to UBSan docs. llvm-svn: 254798
* [CMake] Don't build the libclang tests unless you're building libclangChris Bieneman2015-12-041-1/+1
| | | | | | This fixes a build issue reported by users at Apple. llvm-svn: 254797
* [Docs] Update MSan docsAlexey Samsonov2015-12-042-48/+35
| | | | | | | | | | | | | | Summary: 1. Move MSan-specific flags and features from user manual to MSan page. 2. Update current status / list of supported platforms. Reviewers: eugenis, kcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15246 llvm-svn: 254788
* [Docs] Move the list of CFI schemes down to CFI doc, and update it.Alexey Samsonov2015-12-042-31/+48
| | | | | | | | | | | | | Use proper headling levels in CFI doc. Before that, all sections were considered a subsection of "Introduction". Reviewers: pcc, kcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15237 llvm-svn: 254771
OpenPOWER on IntegriCloud