summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* libclang: correct inverted logicSaleem Abdulrasool2015-12-102-8/+7
| | | | | | | The complete dtor is only emitted when there is a virtual destructor. The test itself was incorrect, so the issue in the code was not noticed. llvm-svn: 255225
* [OPENMP] Make -fopenmp to turn on OpenMP support by default, clang partAlexey Bataev2015-12-102-3/+3
| | | | | | | Patch turns on OpenMP support in clang by default after fixing OpenMP buildbots. Differential Revision: http://reviews.llvm.org/D13803 llvm-svn: 255223
* Fix PR24694 (CWG1591): Deducing array bound and element type from ↵Faisal Vali2015-12-102-13/+103
| | | | | | | | | | | | | | | initializer list https://llvm.org/bugs/show_bug.cgi?id=24694 http://wg21.link/cwg1591 Teach DeduceFromInitializerList in SemaTemplateDeduction.cpp to deduce against array (constant and dependent sized) parameters (really, reference to arrays since they don't decay to pointers), by checking if the template parameter is either one of those kinds of arrays, and if so, deducing each initializer list element against the element type, and then deducing the array bound if needed. In brief, this patch enables the following code: template<class T, int N> int *f(T (&&)[N]); int *ip = f({1, 2, 3}); llvm-svn: 255221
* [MSVC] Fix for http://llvm.org/PR25636: indexed accessor property not ↵Alexey Bataev2015-12-104-12/+42
| | | | | | | | | supported correctly. All problems described in http://llvm.org/PR25636 are implemented except for return value of the 'put' property. This patch fixes this problem with the indexed properties Differential Revision: http://reviews.llvm.org/D15174 llvm-svn: 255218
* Mark MS inline ASM 'nodplicate' it it has labels (PR23715)Hans Wennborg2015-12-102-2/+14
| | | | | | | | Duplicating it can lead to labels being defined twice. Differential revision: http://reviews.llvm.org/D15399 llvm-svn: 255201
* Fix a typo in the clang user manual.Yunzhong Gao2015-12-101-2/+2
| | | | | | -fmax-unknown-pointer-align => -fmax-type-align llvm-svn: 255200
* PR25416: Improve performance of processing inline assembly consisting of manyRichard Smith2015-12-103-17/+50
| | | | | | | | | | implicitly-concatenated string literals. When looking for the start of a token in the inline assembly, start from the end of the previous token, not the start of the entire string. Patch by Yunlian Jiang! llvm-svn: 255198
* [Lit Test] Updated 20 Lit tests to be C++11 compatible.Charles Li2015-12-1020-66/+291
| | | | | | | | This is the 5th Lit test patch. Expanded expected diagnostics to vary by C++ dialect. Expanded RUN line to: default, C++98/03 and C++11. llvm-svn: 255196
* Fix crash on invalid initialization with std::initializer_listReid Kleckner2015-12-092-1/+27
| | | | | | | It is possible for CheckListElementTypes to fail without filling in any initializer list elements. llvm-svn: 255176
* Objective-C properties: loosen 'atomic' checking for readonly properties.Douglas Gregor2015-12-094-22/+112
| | | | | | | | | | | | | | | r251874 reworked the way we handle properties declared within Objective-C class extensions, which had the effective of tightening up property checking in a number of places. In this particular class of cases, we end up complaining about "atomic" mismatches between an implicitly-atomic, readonly property and a nonatomic, readwrite property, which doesn't make sense because "atomic" is essentially irrelevant to readonly properties. Therefore, suppress this diagnostic when the readonly property is implicitly atomic. Fixes rdar://problem/23803109. llvm-svn: 255174
* [CMake] Pass CMAKE_MAKE_PROGRAM through to compiler-rt build.Chris Bieneman2015-12-091-0/+1
| | | | | | This is needed if your make tool is overridden. llvm-svn: 255172
* fix typos; NFCSanjay Patel2015-12-093-5/+4
| | | | llvm-svn: 255163
* unique_ptrify some collections in FileManagerDavid Blaikie2015-12-092-18/+12
| | | | llvm-svn: 255129
* [Hexagon] Use integrated assembler by defaultKrzysztof Parzyszek2015-12-094-65/+67
| | | | llvm-svn: 255127
* clang-format: Improve documentation of AlignOperands.Daniel Jasper2015-12-091-0/+7
| | | | llvm-svn: 255099
* Reformat linefeeds.NAKAMURA Takumi2015-12-094-22/+3
| | | | llvm-svn: 255098
* 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
OpenPOWER on IntegriCloud