summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [DebugInfo] Don't emit checksums when compiling a preprocessed CPPAlexandre Ganea2019-05-216-5/+52
| | | | | | | | Fixes PR41215 Differential Revision: https://reviews.llvm.org/D60283 llvm-svn: 361296
* [LibTooling] Address post-commit feedback for r361152Yitzhak Mandelbaum2019-05-211-2/+1
| | | | | | | | | | | | | | Fixes a redundant dependency and moves another to its proper place. Reviewers: thakis Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62201 llvm-svn: 361285
* [OPENMP]Use the attributes for dso locality when building for device.Alexey Bataev2019-05-216-28/+28
| | | | | | | | | Currently, we ignore all dso locality attributes/info when building for the device and thus all symblos are externally visible and can be preemted at the runtime. It may lead to incorrect results. We need to follow the same logic, compiler uses for static/pie builds. llvm-svn: 361283
* [clang][Darwin] Refactor header search path logic into the driverLouis Dionne2019-05-2136-83/+465
| | | | | | | | | | | | | | | | | | | | | | | Summary: This commit moves the logic for determining system, resource and C++ header search paths from CC1 to the driver. This refactor has already been made for several platforms, but Darwin had been left behind. This refactor tries to implement the previous search path logic with perfect accuracy. In particular, the order of all include paths inside CC1 and all paths that were skipped because nonexistent are conserved after the refactor. This change was also tested against a code base of significant size and revealed no problems. Reviewers: jfb, arphaman Subscribers: nemanjai, javed.absar, kbarton, christof, jkorous, dexonsmith, jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61963 llvm-svn: 361278
* [CMake] One more stab at fixing BUILD_SHARED_LIBSChris Bieneman2019-05-211-0/+1
| | | | | | If clang's libraries are build SHARED, we need to grab their `PRIVATE_LINK_LIBRARIES` properties and add those to clang_shared's interface. llvm-svn: 361275
* Do not use the incorrect attribute spelling list index when translating a ↵Aaron Ballman2019-05-212-3/+22
| | | | | | | | no_sanitize_foo attribute into a no_sanitize("foo") attribute. This fixes a crash when AST pretty printing declarations marked with no_sanitize_memory. llvm-svn: 361274
* Fix BUILD_SHARED_LIBS for clang which broke in D61909Chris Bieneman2019-05-211-1/+7
| | | | | | llvm_add_library ignores `BUILD_SHARED_LIBS` `STATIC` is explicitly specified. This restores the `BUILD_SHARED_LIBS` behavior to the clang build. llvm-svn: 361271
* [OPENMP][NVPTX]Mark more functions as always_inline for betterAlexey Bataev2019-05-2123-203/+305
| | | | | | | | | | | performance. Internally generated functions must be marked as always_inlines in most cases. Patch marks some extra reduction function + outlined parallel functions as always_inline for better performance, but only if the optimization is requested. llvm-svn: 361269
* Add support for dumping AST comment nodes to JSON.Aaron Ballman2019-05-214-6/+1670
| | | | llvm-svn: 361265
* [Syntax] Rename TokensTest to SyntaxTests. NFCIlya Biryukov2019-05-211-2/+2
| | | | | | | To be more consistent with conventions used in the codebase. The new name will be a better fit when more bits of the syntax library land. llvm-svn: 361264
* [ARM][CMSE] Add commandline option and feature macroJaved Absar2019-05-219-0/+47
| | | | | | | | | | | Defines macro ARM_FEATURE_CMSE to 1 for v8-M targets and introduces -mcmse option which for v8-M targets sets ARM_FEATURE_CMSE to 3. A diagnostic is produced when the option is given on architectures without support for Security Extensions. Reviewed By: dmgreen, snidertm Differential Revision: https://reviews.llvm.org/D59879 llvm-svn: 361261
* [CodeGenModule] BlockByrefHelpers - add missing uninitialized variables to ↵Simon Pilgrim2019-05-211-1/+2
| | | | | | constructor. NFCI. llvm-svn: 361242
* [CGBuiltin] dumpRecord - remove unused field offset. NFCI.Simon Pilgrim2019-05-211-5/+0
| | | | llvm-svn: 361238
* [libclang] visit c++14 lambda capture init expressionsNikolai Kosjar2019-05-212-2/+44
| | | | | | | | Patch by Milian Wolff. Differential Revision: https://reviews.llvm.org/D60672 llvm-svn: 361234
* [Preamble] Reuse preamble even if an unsaved file does not existNikolai Kosjar2019-05-214-22/+109
| | | | | | | | | | | | | | | | | | | | | When a preamble is created an unsaved file not existing on disk is already part of PrecompiledPreamble::FilesInPreamble. However, when checking whether the preamble can be re-used, a failed stat of such an unsaved file invalidated the preamble, which led to pointless and time consuming preamble regenerations on subsequent reparses. Do not require anymore that unsaved files should exist on disk. This avoids costly preamble invalidations depending on timing issues for the cases where the file on disk might be removed just to be regenerated a bit later. It also allows an IDE to provide in-memory files that might not exist on disk, e.g. because the build system hasn't generated those yet. Differential Revision: https://reviews.llvm.org/D41005 llvm-svn: 361226
* Try to fix build with older gccs after r361152Nico Weber2019-05-211-2/+3
| | | | | | Also merge the cmake change there to the gn build. llvm-svn: 361209
* Give 'fixit-cxx0x.cpp' a more modern name.Richard Smith2019-05-201-0/+0
| | | | llvm-svn: 361208
* [Sema] Fix for build on some iOS programs.Leonard Chan2019-05-202-1/+21
| | | | | | | | Nullability attributes weren't being stripped for AttributedTypes that were wrapped in a MacroQualifiedType. This fix adds a check for this type and a test. llvm-svn: 361205
* Add more tests for AST JSON output; NFC.Aaron Ballman2019-05-202-1/+5430
| | | | | | This adds tests for dumping expressions in C. It also updates a comment to note an issue to be fixed with printing character literals discovered as part of this testing. llvm-svn: 361193
* [X86] Check the alignment argument for the masked.load/store for the ↵Craig Topper2019-05-201-6/+6
| | | | | | _mm_mask_store_ss/sd and _mm_mask(z)_load_ss/sd intrinsics. llvm-svn: 361187
* [CMake] Update DistributionExample for mono repoChris Bieneman2019-05-202-0/+7
| | | | | | This just updates the DistributionExamples from my 2016 Dev Meeting talk to work more seamlessly with the monorepo. llvm-svn: 361184
* Rearrange and clean up how we disambiguate lambda-introducers from ObjCRichard Smith2019-05-205-118/+188
| | | | | | | | | | | | | | | | message sends, designators, and attributes. Instead of having the tentative parsing phase sometimes return an indicator to say what diagnostic to produce if parsing fails and sometimes ask the caller to run it again, consistently ask the caller to try parsing again if tentative parsing would fail or is otherwise unable to completely parse the lambda-introducer without producing an irreversible semantic effect. Mostly NFC, but we should recover marginally better in some error cases (avoiding duplicate diagnostics). llvm-svn: 361182
* Dump macro expansion information as needed when outputting the AST to JSON.Aaron Ballman2019-05-203-3/+210
| | | | llvm-svn: 361172
* Renamed `apply` to `select` to avoid ADL conflict with `std::apply`Dmitri Gribenko2019-05-201-37/+37
| | | | | | | | | | | | | | | | Summary: `std::apply` in C++14 and above is defined with two unrestricted arguments, and it wins overload resolution in this case. Reviewers: ilya-biryukov Subscribers: cfe-commits, ymandel Tags: #clang Differential Revision: https://reviews.llvm.org/D62150 llvm-svn: 361170
* [Intrinsics] Merge lround.i32 and lround.i64 into a single intrinsic with ↵Craig Topper2019-05-203-14/+21
| | | | | | | | | | overloaded result type. Make result type for llvm.llround overloaded instead of fixing to i64 We shouldn't really make assumptions about possible sizes for long and long long. And longer term we should probably support vectorizing these intrinsics. By making the result types not fixed we can support vectors as well. Differential Revision: https://reviews.llvm.org/D62026 llvm-svn: 361169
* Fix test not to use UNSUPPORTED as a FileCheck prefix.Paul Robinson2019-05-201-6/+6
| | | | | | It was not causing a problem but it's not good practice. llvm-svn: 361161
* [LibTooling] Fix build break in test after r361152.Yitzhak Mandelbaum2019-05-201-1/+2
| | | | | | r361152 broke gcc builds. llvm-svn: 361160
* [LibTooling] Add RangeSelector library for defining source ranges based on ↵Yitzhak Mandelbaum2019-05-205-0/+844
| | | | | | | | | | | | | | | | | | | | | | bound AST nodes. Summary: The RangeSelector library defines a combinator language for specifying source ranges based on bound ids for AST nodes. The combinator approach follows the design of the AST matchers. The RangeSelectors defined here will be used in both RewriteRule, for specifying source affected by edit, and in Stencil for specifying source to use constructively in a replacement. Reviewers: ilya-biryukov Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61774 llvm-svn: 361152
* [Syntax] Introduce TokenBuffer, start clangToolingSyntax libraryIlya Biryukov2019-05-207-0/+1499
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: TokenBuffer stores the list of tokens for a file obtained after preprocessing. This is a base building block for syntax trees, see [1] for the full proposal on syntax trees. This commits also starts a new sub-library of ClangTooling, which would be the home for the syntax trees and syntax-tree-based refactoring utilities. [1]: https://lists.llvm.org/pipermail/cfe-dev/2019-February/061414.html Reviewers: gribozavr, sammccall Reviewed By: sammccall Subscribers: mgrang, riccibruno, Eugene.Zelenko, mgorny, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59887 llvm-svn: 361148
* Fix compilation warning about unused variable [NFC]Mikael Holmen2019-05-201-1/+1
| | | | | | | | | | | Without the fix at least clang 3.6 complains with ../tools/clang/lib/AST/ExprConstant.cpp:90:24: error: unused variable 'TI' [-Werror,-Wunused-variable] if (TypeInfoLValue TI = B.dyn_cast<TypeInfoLValue>()) ^ 1 error generated. llvm-svn: 361145
* [Analyzer] Refactor begin and end symbol creationAdam Balogh2019-05-201-22/+36
| | | | | | | | | | | | This patch refactors begin and end symbol creation by moving symbol conjuration into the `create...` functions. This way the functions' responsibilities are clearer and makes possible to add more functions handling these symbols (e.g. functions for handling the container's size) without code multiplication. Differential Revision: https://reviews.llvm.org/D61136 llvm-svn: 361141
* [ASTImporter] Enable disabled but passing testsGabor Marton2019-05-202-13/+3
| | | | | | | | | | | | Reviewers: a_sidorin, a.sidorin, shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62066 llvm-svn: 361139
* Fix buildbot: Use correct Consume*() for braces.Nicolas Lesser2019-05-191-1/+2
| | | | llvm-svn: 361120
* Added a better diagnostic when using the delete operator with lambdasNicolas Lesser2019-05-195-14/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds a new error for missing parentheses around lambdas in delete operators. ``` int main() { delete []() { return new int(); }(); } ``` This will result in: ``` test.cpp:2:3: error: '[]' after delete interpreted as 'delete[]' delete []() { return new int(); }(); ^~~~~~~~~ test.cpp:2:9: note: add parentheses around the lambda delete []() { return new int(); }(); ^ ( ) ``` Reviewers: rsmith Reviewed By: rsmith Subscribers: riccibruno, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D36357 llvm-svn: 361119
* Add a Visit overload for DynTypedNode to ASTNodeTraverserStephen Kelly2019-05-193-0/+243
| | | | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61834 llvm-svn: 361117
* [AVR] Automatically link CRT and libgcc from the system avr-gccDylan McKay2019-05-198-6/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch modifies the AVR toolchain so that if avr-gcc and avr-libc are detected during compilation, the CRT, libgcc, libm, and libc anre linked. This matches avr-gcc's default behaviour, and the expected behaviour of all C compilers - including the C runtime. avr-gcc also needs a -mmcu specified in order to link runtime libraries. The difference betwen this patch and avr-gcc is that this patch will warn users whenever they compile without a runtime, as opposed to GCC, which silently trims the runtime libs from the linker arguments when no -mmcu is specified. Reviewers: aaron.ballman, kparzysz, asb, hfinkel, brucehoult, TimNN Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D54334 llvm-svn: 361116
* [X86] Remove semicolons at the end of intrinsics implemented as macros so ↵Craig Topper2019-05-193-28/+28
| | | | | | | | | | they can be used as arguments to other intrinsics. Also fix one intrinsic that was using variable names without underscores. Fixes PR41932 llvm-svn: 361109
* [analyzer] PR41753: Include complex integer types in NonLoc::isCompoundTypeKristof Umann2019-05-183-15/+38
| | | | | | | | https://bugs.llvm.org/show_bug.cgi?id=41753 Differential Revision: https://reviews.llvm.org/D61570 llvm-svn: 361099
* ScalarExprEmitter::EmitCompoundAssign - fix uninitialized variable warning. ↵Simon Pilgrim2019-05-181-1/+1
| | | | | | NFCI. llvm-svn: 361098
* MIGChecker - assert we have a non-null LocationContext. NFCI.Simon Pilgrim2019-05-181-0/+2
| | | | | | Fixes scan-build warning. llvm-svn: 361097
* ASTNodeImporter - fix uninitialized variable warnings. NFCI.Simon Pilgrim2019-05-181-2/+2
| | | | llvm-svn: 361096
* [c++20] P1327R1: Support for typeid applied to objects of polymorphicRichard Smith2019-05-174-20/+98
| | | | | | | | | class type in constant evaluation. This reinstates r360977, reverted in r360987, now that its rerequisite patch is reinstated and fixed. llvm-svn: 361067
* [OpenMP][bugfix] Add missing math functions variants for log and abs.Gheorghe-Teodor Bercea2019-05-172-0/+16
| | | | | | | | | | | | | | | | Summary: When including the random header in C++, some of the math functions it relies on are not present in the CUDA headers. We include this variants in this case. Reviewers: jdoerfert, hfinkel, tra, caomhin Reviewed By: tra Subscribers: efriedma, guansong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62046 llvm-svn: 361066
* Add more tests for AST JSON output; NFC.Aaron Ballman2019-05-173-0/+15152
| | | | | | This adds tests for dumping records and statements. llvm-svn: 361065
* Revert r361033 "Add a Visit overload for DynTypedNode to ASTNodeTraverser"Nico Weber2019-05-173-239/+0
| | | | | | | | It fails to build on some bots. Also revert follow-up r361055. llvm-svn: 361059
* Attempt to fix test on Windows after r360998Nico Weber2019-05-171-1/+3
| | | | llvm-svn: 361054
* Added an assertion to constant evaluation enty points that prohibits ↵Dmitri Gribenko2019-05-174-4/+69
| | | | | | | | | | | | | | | | | | dependent expressions Summary: Constant evaluator does not work on value-dependent or type-dependent expressions. Also fixed bugs uncovered by these assertions. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61522 llvm-svn: 361050
* [analyzer] Remove the default value arg from getChecker*OptionKristof Umann2019-05-1718-81/+102
| | | | | | | | | | | | | | | | | | | Since D57922, the config table contains every checker option, and it's default value, so having it as an argument for getChecker*Option is redundant. By the time any of the getChecker*Option function is called, we verified the value in CheckerRegistry (after D57860), so we can confidently assert here, as any irregularities detected at this point must be a programmer error. However, in compatibility mode, verification won't happen, so the default value must be restored. This implies something else, other than adding removing one more potential point of failure -- debug.ConfigDumper will always contain valid values for checker/package options! Differential Revision: https://reviews.llvm.org/D59195 llvm-svn: 361042
* [LibTooling] Add support to Transformer for composing rules as an ordered ↵Yitzhak Mandelbaum2019-05-173-31/+276
| | | | | | | | | | | | | | | | | | | | choice. This revision updates `RewriteRule` to support multiple subrules that are interpreted as an ordered-choice (apply the first one that matches). With this feature, users can write the rules that appear later in the list of subrules knowing that previous rules' patterns *have not matched*, freeing them from reasoning about those cases in the current pattern. Reviewers: ilya-biryukov Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61335 llvm-svn: 361037
* Extract ASTDumper to a header fileStephen Kelly2019-05-172-46/+57
| | | | | | | | | | | | | | | | | | Summary: This class has member APIs which are useful to clients. Make it possible to use those APIs without adding them to dump() member functions. Doing so does not scale. The optional arguments to dump() should be designed to be useful in a debugging context. Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61835 llvm-svn: 361034
OpenPOWER on IntegriCloud