summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Add check that "#define unix 1" is present for the PS4 target.Douglas Yung2017-02-091-0/+1
| | | | llvm-svn: 294534
* Initialize builtins during modular codegenDavid Blaikie2017-02-088-68/+83
| | | | llvm-svn: 294512
* More fixes for places where 'decltype(auto)' is permitted in the C++ grammar ↵Richard Smith2017-02-081-10/+25
| | | | | | but makes no sense. llvm-svn: 294509
* Don't crash on 'decltype(auto)::'. Rather than treating it as a meaninglessRichard Smith2017-02-081-0/+12
| | | | | | | | nested-name-specifier (as the standard appears to require), treat it as the type specifier 'decltype(auto)' followed by a nested-name-specifier starting with '::'. llvm-svn: 294506
* [Lit Test] Make tests C++11 compatible - Parse OpenMPCharles Li2017-02-082-5/+37
| | | | | | Differential Revision: https://reviews.llvm.org/D29725 llvm-svn: 294504
* [MS] Fix C++ destructor thunk line info for a declarationReid Kleckner2017-02-081-0/+14
| | | | | | | | | | Sometimes the MS ABI needs to emit thunks for declarations that don't have bodies. Destructor thunks make calls to inlinable functions, so they need line info or LLVM will complain. Fixes PR31893 llvm-svn: 294465
* [X86] Add -mprefetchwt1/-mno-prefetchwt1 command line options and ↵Craig Topper2017-02-082-0/+7
| | | | | | __PREFETCHWT1__ define to match gcc. llvm-svn: 294424
* [X86] Add -msgx/-mno-sgx command line options and __SGX__ define to match gcc.Craig Topper2017-02-082-0/+11
| | | | llvm-svn: 294423
* [X86] Add -mmpx/-mno-mpx command line options and __MPX__ define to match gcc.Craig Topper2017-02-082-0/+11
| | | | llvm-svn: 294419
* [X86] Add -mclwb/-mno-clwb command line arguments and __CLWB__ define to ↵Craig Topper2017-02-082-0/+7
| | | | | | | | match gcc. In the future, we should also add a clwb intrinsic to the backend, a frontend builtin, and an instrinsic header file. llvm-svn: 294416
* [X86] Add -mmovbe/-mno-movbe command line options to match gcc.Craig Topper2017-02-081-0/+5
| | | | llvm-svn: 294413
* [X86] Add -mclflushopt/-mno-clflushopt command line support and ↵Craig Topper2017-02-083-0/+17
| | | | | | __CLFLUSHOPT__ define to match gcc. llvm-svn: 294411
* [AVR] Add support for the 'interrupt' and 'naked' attributesDylan McKay2017-02-084-0/+28
| | | | | | | | | | | | | | | | Summary: This teaches clang how to parse and lower the 'interrupt' and 'naked' attributes. This allows interrupt signal handlers to be written. Reviewers: aaron.ballman Subscribers: malcolm.parsons, cfe-commits Differential Revision: https://reviews.llvm.org/D28451 llvm-svn: 294402
* Sema: add warning for c++ member variable shadowingSaleem Abdulrasool2017-02-083-11/+123
| | | | | | | | | | Add a warning for shadowed variables across records. Referencing a shadow'ed variable may not give the desired variable. Add an optional warning for the shadowing. Patch by James Sun! llvm-svn: 294401
* Diagnose an attempt to give a deduction-guide a function body.Richard Smith2017-02-081-5/+5
| | | | llvm-svn: 294397
* Fix constructor declarator detection for the case when the name is followed byRichard Smith2017-02-082-5/+7
| | | | | | an attribute-specifier-seq. (Also fixes the same problem for deduction-guides.) llvm-svn: 294396
* P0091R3: Improved syntactic checking of deduction-guides.Richard Smith2017-02-082-11/+26
| | | | llvm-svn: 294395
* [PCH] Fix a regression when PCH is used with -fmodulesBruno Cardoso Lopes2017-02-079-0/+32
| | | | | | | | | | | | | | | | | Following up on r291465 after a regression in r276159. When we use -fmodule-name=X while building a PCH, modular headers in X will be textually included and the compiler knows that we are not building module X, so don't serialize such headers in the PCH as being part of a module, because at this point they are not. This was causing subtle bugs and malformed AST crashes, for instance, when using the PCH in subsequent compiler invocation with -fmodules, the HFI for a modular header would map to the PCH, which would force a module load of and unexistent module ID. rdar://problem/30171164 llvm-svn: 294361
* Revert "Basic: match GCC behaviour for SuS macro"Saleem Abdulrasool2017-02-075-9/+22
| | | | | | | This reverts commit SVN r294148. Seems that it was mistaken, and GCC does still define `__unix` and `unix` when in GNU mode. llvm-svn: 294332
* [OpenCL] Accept logical NOT for pointer types in CL1.1Anastasia Stulova2017-02-072-57/+59
| | | | | | | | | Fix for bug 30217 - incorrect error given for logical NOT operation with a pointer type: corrected sema check and improved related tests. Review: D29038 llvm-svn: 294313
* Revert "Revert "[AVR] Allow specifying the CPU on the command line""Dylan McKay2017-02-073-0/+20
| | | | | | This reverts commit 7ac30e0f839fdab6d723ce2ef6a5b7a4cf03d150. llvm-svn: 294282
* AMDGPU: Add a test checking alignments of emitted globals/allocasMatt Arsenault2017-02-071-0/+522
| | | | | | | Make sure the spec required type alignments are used in preparation for a possible change which may break this. llvm-svn: 294278
* Driver: Do not link safestack with --whole-archive.Peter Collingbourne2017-02-071-0/+2
| | | | | | | | This allows it to be used with the other sanitizers. Differential Revision: https://reviews.llvm.org/D29545 llvm-svn: 294274
* P0091R3: Implement basic parsing support for C++17 deduction-guides.Richard Smith2017-02-073-0/+161
| | | | | | | | | | | We model deduction-guides as functions with a new kind of name that identifies the template whose deduction they guide; the bulk of this patch is adding the new name kind. This gives us a clean way to attach an extensible list of guides to a class template in a way that doesn't require any special handling in AST files etc (and we're going to need these functions we come to performing deduction). llvm-svn: 294266
* [Lit Test] Make tests C++11 compatible - Microsoft diagnosticsCharles Li2017-02-064-50/+293
| | | | | | Differential Revision: https://reviews.llvm.org/D29520 llvm-svn: 294225
* [SystemZ] Provide predefined __ARCH__ and __VX__ macrosUlrich Weigand2017-02-061-23/+70
| | | | | | | | | | | | GCC 7 will predefine two new macros on s390x: - __ARCH__ indicates the ISA architecture level - __VX__ indicates that the vector facility is available This adds those macros to clang as well to ensure continued compatibility with GCC. llvm-svn: 294197
* [OpenMP] Remove fixme comment in regression test and related unnecessary ↵Carlo Bertolli2017-02-061-2/+0
| | | | | | | | | | statement https://reviews.llvm.org/D29501 It looks like I forgot to remove a FIXME comment with the associated statement. The test does not need it and it gives the wrong impression of being an incomplete test. llvm-svn: 294195
* Revert "[AVR] Allow specifying the CPU on the command line"Diana Picus2017-02-063-17/+0
| | | | | | This reverts commit r294177. It seems to have broken some buildbots. llvm-svn: 294180
* [AVR] Allow specifying the CPU on the command lineDylan McKay2017-02-063-0/+17
| | | | | | | | | | | | | | | | | | Summary: This tells clang about all of the different AVR microcontrollers. It also adds code to define the correct preprocessor macros for each device. Reviewers: jroelofs, asl Reviewed By: asl Subscribers: asl, cfe-commits Differential Revision: https://reviews.llvm.org/D28346 llvm-svn: 294177
* [AVR] Add support for the full set of inline asm constraintsDylan McKay2017-02-062-0/+132
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously the method would simply return false, causing every single inline assembly constraint to trigger a compile error. This adds inline assembly constraint support for the AVR target. This patch is derived from the code in AVRISelLowering::getConstraintType. More details can be found on the AVR-GCC reference wiki http://www.nongnu.org/avr-libc/user-manual/inline_asm.html Reviewers: jroelofs, asl Reviewed By: asl Subscribers: asl, ahatanak, saaadhu, cfe-commits Differential Revision: https://reviews.llvm.org/D28344 llvm-svn: 294176
* Basic: match GCC behaviour for SuS macroSaleem Abdulrasool2017-02-055-22/+9
| | | | | | | | GCC does not generate `__unix` nor `unix` macros. The latter already intrudes into the user's namespace and should be avoided. Use the canonical spelling of `__unix__` across all the targets. llvm-svn: 294148
* [X86][MS]Adjacent comments within multi-line inline assembly statementCoby Tayree2017-02-051-0/+6
| | | | | | | | Allowing adjacent comments within MS inline assembly multi-line statement Differential Revision: https://reviews.llvm.org/D28989 llvm-svn: 294120
* PR31846: Don't replace 'auto' type with a template parameter type in a ↵Richard Smith2017-02-041-0/+7
| | | | | | | | generic lambda until after we've checked whether 'auto' is valid in the current language mode. llvm-svn: 294078
* Driver: Do not warn about unused -pthread when linking on darwinMatthias Braun2017-02-031-0/+4
| | | | | | | | While there is nothing to do at link time to get pthreads support on darwin, specifying the argument is fine and we should not warn about unused arguments. llvm-svn: 294065
* [x86] fix tests with wrong dependency to pass because they broke with r294049Sanjay Patel2017-02-031-4/+6
| | | | llvm-svn: 294058
* [OpenMP] Add missing regression test for pragma distribute, clause firstprivateCarlo Bertolli2017-02-031-0/+382
| | | | | | | | https://reviews.llvm.org/D28243 The regression test was missing from the previous already accepted patch. llvm-svn: 294026
* [Lit Test] Make tests C++11 compatible - OpenMP constant expressionsCharles Li2017-02-034-6/+83
| | | | | | | | C++11 introduced constexpr, hence the change in diagnostics. Differential Revision: https://reviews.llvm.org/D29480 llvm-svn: 294025
* [Sema][ObjC++] Typo correction should handle ivars and propertiesAlex Lorenz2017-02-031-0/+15
| | | | | | | | | | | | | | | | After r260016 and r260017 disabled typo correction for ivars and properties clang didn't report errors about unresolved identifier in the base of ivar and property ref expressions. This meant that clang invoked CodeGen on invalid AST which then caused a crash. This commit re-enables typo correction for ivars and properites, and fixes the PR25113 & PR26486 (that were originally fixed in r260017 and r260016) in a different manner by transforming the Objective-C ivar reference expression with 'IsFreeIvar' preserved. rdar://30310772 llvm-svn: 294008
* Prevent ICE in dllexport class with _Atomic data memberWarren Ristow2017-02-021-0/+9
| | | | | | | | | | Guard against a null pointer dereference that caused Clang to crash when processing a class containing an _Atomic qualified data member, and that is tagged with 'dllexport'. Differential Revision: https://reviews.llvm.org/D29208 llvm-svn: 293911
* [analyzer] Fix an assertion fail in CStringSyntaxChecker.Gabor Horvath2017-02-021-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D29384 llvm-svn: 293874
* Fix attribute name in diagnostic message to match actual attribute name.Richard Smith2017-02-021-22/+22
| | | | llvm-svn: 293853
* [CodeGen] Update test after recent changes in llvm (r293846).Davide Italiano2017-02-021-1/+1
| | | | llvm-svn: 293848
* Repoint 'missing typename' diagnostic to the location where 'typename' ↵Richard Smith2017-02-011-1/+2
| | | | | | should be added. llvm-svn: 293817
* Fix hole in our enforcement of rule requiring 'typename' prior to a dependentRichard Smith2017-02-013-3/+44
| | | | | | | | | | | name. If the dependent name happened to end in a template-id (X<T>::Y<U>), we would fail to notice that the 'typename' keyword is missing when resolving it to a type. It turns out that GCC has a similar bug. If this shows up in much real code, we can easily downgrade this to an ExtWarn. llvm-svn: 293815
* [CodeGen] Update test after recent changes in llvm (r293799).Davide Italiano2017-02-011-1/+1
| | | | llvm-svn: 293810
* [Sema][ObjC] Don't pass a DeclRefExpr that doesn't reference a VarDeclAkira Hatanaka2017-02-011-0/+13
| | | | | | | | | | to WeakObjectProfileTy's constructor. This fixes an assertion failure in WeakObjectProfileTy's constructor. rdar://problem/30112633 llvm-svn: 293808
* Drop 'dllimport' when redeclaring inline function template without the ↵Hans Wennborg2017-02-012-36/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | attribute (PR31695) For non-template dllimport functions, MSVC allows providing an inline definition without spelling out the attribute again. In the example below, f remains a dllimport function. __declspec(dllimport) int f(); inline int f() { return 42; } int useit() { return f(); } However, for a function template, not putting dllimport on the redeclaration causes it to be dropped. In the example below, f is not dllimport. template <typename> __declspec(dllimport) int f(); template <typename> inline int f() { return 42; } int useit() { return f<int>(); } This patch makes Clang match MSVC for the second example. MSVC does not warn about the attribute being dropped in the example above, but I think we should. (MSVC does warn if the inline keyword isn't used.) Differential Revision: https://reviews.llvm.org/D29152 llvm-svn: 293800
* [CodeGen][ObjC] Avoid asserting on block pointer types inAlex Lorenz2017-02-011-0/+28
| | | | | | | | isPointerZeroInitializable rdar://30111891 llvm-svn: 293787
* Fix Index test after recent clang-format change.Daniel Jasper2017-02-011-2/+2
| | | | llvm-svn: 293754
* Follow-up to r293732: add a proper triple to the testHans Wennborg2017-02-011-2/+2
| | | | llvm-svn: 293735
OpenPOWER on IntegriCloud