summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Add -mmpx/-mno-mpx command line options and __MPX__ define to match gcc.Craig Topper2017-02-085-0/+17
| | | | llvm-svn: 294419
* [X86] Add -mclwb/-mno-clwb command line arguments and __CLWB__ define to ↵Craig Topper2017-02-084-0/+11
| | | | | | | | 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] Remove 'umip' feature flag.Craig Topper2017-02-081-5/+0
| | | | | | This feature flag indicates that the processor has support for removing certain instructions from user mode software. But the feature flag by itself doesn't indicate if the support is enabled in the OS. The affected instructions aren't even instructions the compiler would emit. So I don't think think this feature flag should be in the compiler. llvm-svn: 294414
* [X86] Add -mmovbe/-mno-movbe command line options to match gcc.Craig Topper2017-02-082-0/+7
| | | | llvm-svn: 294413
* [X86] Add -mclflushopt/-mno-clflushopt command line support and ↵Craig Topper2017-02-086-0/+23
| | | | | | __CLFLUSHOPT__ define to match gcc. llvm-svn: 294411
* Use LLVM_FALLTHROUGH instead of FALLTHROUGH comments.Craig Topper2017-02-081-13/+13
| | | | llvm-svn: 294404
* [X86] Remove PCOMMIT feature support since Intel has deprecated this ↵Craig Topper2017-02-081-5/+0
| | | | | | | | instruction with no plans to release products with it. Intel's documentation for the deprecation https://software.intel.com/en-us/blogs/2016/09/12/deprecate-pcommit-instruction llvm-svn: 294403
* [AVR] Add support for the 'interrupt' and 'naked' attributesDylan McKay2017-02-088-0/+129
| | | | | | | | | | | | | | | | 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-087-12/+190
| | | | | | | | | | 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-083-5/+10
| | | | llvm-svn: 294397
* Fix constructor declarator detection for the case when the name is followed byRichard Smith2017-02-083-8/+20
| | | | | | 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-087-43/+159
| | | | llvm-svn: 294395
* [ASTReader] Improve ReadASTBlock error message when module not availableBruno Cardoso Lopes2017-02-071-1/+4
| | | | | | | | Point to the PCM file that could not be found. rdar://problem/30381981 llvm-svn: 294362
* [PCH] Fix a regression when PCH is used with -fmodulesBruno Cardoso Lopes2017-02-0710-1/+34
| | | | | | | | | | | | | | | | | 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
* Enable -dump-deserialized-decls and -error-on-deserialized-decl for modules.Vassil Vassilev2017-02-071-16/+22
| | | | llvm-svn: 294359
* clang-format: Fix bad variable declaration detection.Daniel Jasper2017-02-072-1/+10
| | | | | | | | | | | | Before: LooooooooooooooooongType variable(nullptr, [](A *a) {}); After: LooooooooooooooooongType variable(nullptr, [](A *a) {}); llvm-svn: 294358
* Revert "Basic: match GCC behaviour for SuS macro"Saleem Abdulrasool2017-02-076-24/+37
| | | | | | | 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
* clang-format: [JS] correcly format object literal methods.Martin Probst2017-02-073-8/+30
| | | | | | | | | | | | | | | | | | | | | Summary: In JavaScript, object literals can contain methods: var x = { a() { return 1; }, }; Previously, clang-format always parsed nested {} inside a braced list as further braced lists. Special case this logic for JavaScript to try parsing as a braced list, but fall back to parsing as a child block. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D29656 llvm-svn: 294315
* [OpenCL] Accept logical NOT for pointer types in CL1.1Anastasia Stulova2017-02-073-58/+60
| | | | | | | | | 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
* clang-format: [JS] exclaim preceding regex literals.Martin Probst2017-02-072-1/+4
| | | | | | | | | | | | | | | | | | | | Summary: Regex detection would incorrectly classify a trailing `!` operator (nullability cast) followed by a `/` as the start of a regular expression literal. This fixes code such as: var foo = x()! / 10; Which would previously parse a regexp all the way to the end of the source file (or next `/`). Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29634 llvm-svn: 294304
* clang-format: [JS] handle parenthesized class expressions.Martin Probst2017-02-073-7/+24
| | | | | | | | | | | | | | | | | | | | Summary: In JavaScript, classes are expressions, so they can appear e.g. in argument lists. var C = foo(class { bar() { return 1; } }; Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29635 llvm-svn: 294302
* Revert "Revert "[AVR] Allow specifying the CPU on the command line""Dylan McKay2017-02-074-0/+313
| | | | | | 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-072-3/+7
| | | | | | | | 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-0733-72/+540
| | | | | | | | | | | 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
* [CMake] Add CLANG_INCLUDE_DIRS to CMake exportsChris Bieneman2017-02-062-0/+8
| | | | | | This patch adds setting CLANG_INCLUDE_DIRS in the generated CMake package configuration files. llvm-svn: 294207
* [SystemZ] Provide predefined __ARCH__ and __VX__ macrosUlrich Weigand2017-02-062-23/+81
| | | | | | | | | | | | 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-064-310/+0
| | | | | | This reverts commit r294177. It seems to have broken some buildbots. llvm-svn: 294180
* clang-format: Fix bug with conflicting BreakBeforeBinaryOperations and ↵Daniel Jasper2017-02-062-1/+40
| | | | | | | | | | | | | | | | AlignAfterOpenBracket Fix for the formatting options combination of BreakBeforeBinaryOperators: All, AlignAfterOpenBracket: AlwaysBreak not handling long templates correctly. This patch allows a break after an opening left parenthesis, TemplateOpener, or bracket when both options are enabled. Patch by Daphne Pfister, thank you! Fixes llvm.org/PR30304. llvm-svn: 294179
* [AVR] Allow specifying the CPU on the command lineDylan McKay2017-02-064-0/+310
| | | | | | | | | | | | | | | | | | 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-063-0/+183
| | | | | | | | | | | | | | | | | | | | | | | | 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-056-37/+24
| | | | | | | | 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-052-0/+11
| | | | | | | | 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-044-34/+44
| | | | | | | | 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-032-0/+8
| | | | | | | | 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
* clang-format: [JS] Fix bugs in parsing and aligning template strings.Daniel Jasper2017-02-033-3/+9
| | | | llvm-svn: 294009
* [Sema][ObjC++] Typo correction should handle ivars and propertiesAlex Lorenz2017-02-033-16/+24
| | | | | | | | | | | | | | | | 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
* [clang-format] Re-align broken comment lines where appropriate.Krasimir Georgiev2017-02-032-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The comment aligner was skipping over newly broken comment lines. This patch fixes that. source: ``` int ab; // line int a; // long long ``` format with column limit 15 before: ``` int ab; // line int a; // long // long ``` format with column limit 15 after: ``` int ab; // line int a; // long // long ``` Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29486 llvm-svn: 293997
* clang-format: [Proto] Also supports implicit string literal concatenationDaniel Jasper2017-02-032-1/+5
| | | | llvm-svn: 293995
* Revert "[Driver] Updated for Visual Studio 2017"Reid Kleckner2017-02-024-407/+256
| | | | | | | This reverts commit r293923. It causes test failures on Linux that need time to debug. llvm-svn: 293924
* [Driver] Updated for Visual Studio 2017Reid Kleckner2017-02-024-256/+407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The patch updates the MSVC ToolChain for the changes made in Visual Studio 2017[1]. Other notable changes: - Path handling code has been centralised to make potential future changes less painful. - A compiler error is emitted if the driver is unable to locate a usable MSVC toolchain. (Previously it'd fail with a cryptic error such as "link.exe is not executable") - Support for the new Setup Config Server API[2] has been added, albeit block commented out with a preprocessor conditional. This can probably be re-evaluated when the API is officially released (it's currently at the RC stage), but it's left in to make it easy for anyone familiar with the API to give it a go with Clang. Patch by Hamza Sood. [1] https://blogs.msdn.microsoft.com/vcblog/2016/10/07/compiler-tools-layout-in-visual-studio-15/ [2] https://blogs.msdn.microsoft.com/heaths/2016/09/15/changes-to-visual-studio-15-setup/ Reviewers: ruiu, hans, rnk Reviewed By: rnk Subscribers: awson, RKSimon, amccarth, cfe-commits Differential Revision: https://reviews.llvm.org/D28365 llvm-svn: 293923
* Prevent ICE in dllexport class with _Atomic data memberWarren Ristow2017-02-022-4/+14
| | | | | | | | | | 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
* [index] Provide a more general index::generateUSRForMacro() that doesn't ↵Argyrios Kyrtzidis2017-02-022-3/+15
| | | | | | depend on having a PreprocessingRecord. llvm-svn: 293904
* [clang-format] Don't reflow across comment pragmas.Krasimir Georgiev2017-02-026-22/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The comment reflower wasn't taking comment pragmas as reflow stoppers. This patch fixes that. source: ``` // long long long long // IWYU pragma: ``` format with column limit = 20 before: ``` // long long long // long IWYU pragma: ``` format with column limit = 20 after: ``` // long long long // long // IWYU pragma: ``` Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29450 llvm-svn: 293898
* [clang-format] Fix breaking of comment sections in unwrapped lines ↵Krasimir Georgiev2017-02-024-4/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | containing newlines. Summary: The breaking of line comment sections was misaligning the case where the first comment line is on an unwrapped line containing newlines. In this case, the breaking column must be based on the source column of the last token that is preceded by a newline, not on the first token of the unwrapped line. source: ``` enum A { a, // line 1 // line 2 }; ``` format before: ``` enum A { a, // line 1 // line 2 }; ``` format after: ``` enum A { a, // line 1 // line 2 }; ``` Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D29444 llvm-svn: 293891
OpenPOWER on IntegriCloud