summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Part of P1091R3: permit structured bindings to be declared 'static' andRichard Smith2019-05-227-11/+105
| | | | | | 'thread_local' in C++20. llvm-svn: 361424
* [LibTooling] Update Stencil to use RangeSelectorYitzhak Mandelbaum2019-05-223-67/+55
| | | | | | | | | | | | | | | | | | | Add support for creating a `StencilPart` from any `RangeSelector`, which broadens the scope of `Stencil`. Correspondingly, deprecate Stencil's specialized combinators `node` and `sNode` in favor of using the new `selection` combinator directly (with the appropriate range selector). Reviewers: sbenza Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62160 llvm-svn: 361413
* Fixed a -Wunused-variable warning when assertions are disabledDmitri Gribenko2019-05-221-0/+1
| | | | llvm-svn: 361411
* Combine two if cases because the second one is never reached.Amy Huang2019-05-221-6/+4
| | | | | | | | | | Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62214 llvm-svn: 361400
* [LibTooling] Update Transformer to use RangeSelector instead of NodePart enum.Yitzhak Mandelbaum2019-05-223-183/+56
| | | | | | | | | | | | | | | | | Transformer provides an enum to indicate the range of source text to be edited. That support is now redundant with the new (and more general) RangeSelector library, so we remove the custom enum support in favor of supporting any RangeSelector. Reviewers: ilya-biryukov Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62149 llvm-svn: 361392
* Reland r361148 with a fix to the buildbot failure.Ilya Biryukov2019-05-227-0/+1499
| | | | | | | Reverted in r361377. Also reland the '.gn' files (reverted in r361389). llvm-svn: 361391
* [OpenCL] Support pipe keyword in C++ modeSven van Haastregt2019-05-227-10/+26
| | | | | | | | | | | | Support the OpenCL C pipe feature in C++ for OpenCL mode, to preserve backwards compatibility with OpenCL C. Various changes had to be made in Parse and Sema to enable pipe-specific diagnostics, so enable a SemaOpenCL test for C++. Differential Revision: https://reviews.llvm.org/D62181 llvm-svn: 361382
* [CGOpenMPRuntime] emitX86DeclareSimdFunction - assert simdlen/cdtsize is not ↵Simon Pilgrim2019-05-221-2/+3
| | | | | | | | zero. NFCI. Fixes scan-build division by zero warning. llvm-svn: 361379
* Clang-formatting the header in advance of other planned changes; NFC.Aaron Ballman2019-05-221-21/+37
| | | | llvm-svn: 361378
* Revert r361148 "[Syntax] Introduce TokenBuffer, start clangToolingSyntax ↵Russell Gallop2019-05-227-1499/+0
| | | | | | | | | | | | library" Also reverted r361264 "[Syntax] Rename TokensTest to SyntaxTests. NFC" which built on it. This is because there were hitting an assert on bots http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast llvm-svn: 361377
* [Frontend] Return an error on bad inputs to PrecompiledPreabmleIlya Biryukov2019-05-223-9/+12
| | | | | | | | | | | | | | | | | | Summary: Instead of failing with assertions. Fixes a crash found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12865 Reviewers: sammccall Reviewed By: sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62137 llvm-svn: 361376
* Mark tests from r361278 as unsupported on Windows.Russell Gallop2019-05-223-0/+6
| | | | llvm-svn: 361374
* [ARM][AArch64] Fix incorrect handling of alignment in va_arg code generationJohn Brawn2019-05-224-15/+984
| | | | | | | | | | | | | Overaligned and underaligned types (i.e. types where the alignment has been increased or decreased using the aligned and packed attributes) weren't being correctly handled in all cases, as the unadjusted alignment should be used. This patch also adjusts getTypeUnadjustedAlign to correctly handle typedefs of non-aggregate types, which it appears it never had to handle before. Differential Revision: https://reviews.llvm.org/D62152 llvm-svn: 361372
* [Driver][Windows] Add dependent lib argument for -fprofile-generate and ↵Russell Gallop2019-05-222-4/+12
| | | | | | | | | | -fcs-profile-generate Follows on from r360674 which added it for -fprofile-instr-generate. Differential Revision: https://reviews.llvm.org/D62200 llvm-svn: 361368
* [PPC64] Fix PPC64TargetInfo ABI on clang side after D61950Fangrui Song2019-05-221-1/+2
| | | | llvm-svn: 361365
* [PPC64] Fix PPC64TargetInfo after D61950Fangrui Song2019-05-221-0/+1
| | | | llvm-svn: 361363
* [PPC64] Parse -elfv1 -elfv2 when specified on target tripleFangrui Song2019-05-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: For big-endian powerpc64, the default ABI is ELFv1. OpenPower ABI ELFv2 is supported when -mabi=elfv2 is specified. FreeBSD support for PowerPC64 ELFv2 ABI with LLVM is in progress[1]. This patch adds an alternative way to specify ELFv2 ABI on target triple [2]. The following results are expected: ELFv1 when using: -target powerpc64-unknown-freebsd12.0 -target powerpc64-unknown-freebsd12.0 -mabi=elfv1 -target powerpc64-unknown-freebsd12.0-elfv1 ELFv2 when using: -target powerpc64-unknown-freebsd12.0 -mabi=elfv2 -target powerpc64-unknown-freebsd12.0-elfv2 [1] https://wiki.freebsd.org/powerpc/llvm-elfv2 [2] https://clang.llvm.org/docs/CrossCompilation.html Patch by Alfredo Dal'Ava Júnior! Differential Revision: https://reviews.llvm.org/D61950 llvm-svn: 361355
* Fixed a -Wunused-variable warning when assertions are disabledDmitri Gribenko2019-05-221-0/+1
| | | | llvm-svn: 361353
* [Docs] Increase Doxygen cache sizeDon Hinton2019-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: When building Doxygen docs for llvm and clang, it helpfully prints a warning at the end noting that the `LOOKUP_CACHE_SIZE` value was too small to keep all symbols in memory. By increasing to the size it recommends, Doxygen builds have greatly improved performance. On my machine, time to run `doxygen-llvm` changes from 34 minutes to 22 minutes, which is a decent amount of time saved by changing a single number. Reviewed By: hintonda Patch by J. Ryan Stinnett! Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D62138 llvm-svn: 361343
* [Analysis] Link library dependencies to Analysis pluginsPetr Hosek2019-05-223-3/+6
| | | | | | | | | These are needed to avoid undefined symbols which aren't satisfied by Clang itself. Differential Revision: https://reviews.llvm.org/D62174 llvm-svn: 361340
* [PragmaHandler] Expose `#pragma` locationJoel E. Denny2019-05-218-111/+112
| | | | | | | | | | | | | | | | | | | | | | | Currently, a pragma AST node's recorded location starts at the namespace token (such as `omp` in the case of OpenMP) after the `#pragma` token, and the `#pragma` location isn't available. However, the `#pragma` location can be useful when, for example, rewriting a directive using Clang's Rewrite facility. This patch makes `#pragma` locations available in any `PragmaHandler` but it doesn't yet make use of them. This patch also uses the new `struct PragmaIntroducer` to simplify `Preprocessor::HandlePragmaDirective`. It doesn't do the same for `PPCallbacks::PragmaDirective` because that changes the API documented in `clang-tools-extra/docs/pp-trace.rst`, and I'm not sure about backward compatibility guarantees there. Reviewed By: ABataev, lebedev.ri, aaron.ballman Differential Revision: https://reviews.llvm.org/D61643 llvm-svn: 361335
* Fix target property to make BUILD_SHARED_LIBS workChris Bieneman2019-05-211-1/+1
| | | | | | | | Public and Private link libraries get merged in the LINK_LIBRARIES property instead of being kept separate. With any luck this will get `BUILD_SHARED_LIBS` working again on Linux. llvm-svn: 361334
* [c++20] P1330R0: permit simple-assignments that change the active memberRichard Smith2019-05-218-11/+313
| | | | | | of a union within constant expression evaluation. llvm-svn: 361329
* Refactor: split Uninitialized state on APValue into an "Absent" stateRichard Smith2019-05-219-61/+83
| | | | | | | representing no such object, and an "Indeterminate" state representing an uninitialized object. The latter is not yet used, but soon will be. llvm-svn: 361328
* Rename identifiers to spell out analyze; NFC.Aaron Ballman2019-05-213-26/+26
| | | | llvm-svn: 361325
* [Driver] Verify GCCInstallation is validNick Desaulniers2019-05-212-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Values returned by GCCInstallation.getParentLibPath() and GCCInstallation.getTriple() are not valid unless GCCInstallation.isValid() returns true. This has previously been ignored, and the former two values were used without checking whether GCCInstallation is valid. This led to the bad path "/../bin" being added to the list of program paths. author: danielmentz "Daniel Mentz <danielmentz@google.com>" Reviewers: #clang, tstellar, srhines Reviewed By: srhines Subscribers: danielmentz, ormris, nickdesaulniers, srhines, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57930 llvm-svn: 361314
* Let -static-pie win if it is specified along with -pie or -static.Siva Chandra2019-05-213-7/+62
| | | | | | | | Also, disallow specifying -no-pie/-nopie along with -static-pie. Differential Revision: https://reviews.llvm.org/D59841 llvm-svn: 361312
* Remove unicode character from testLeonard Chan2019-05-211-1/+2
| | | | llvm-svn: 361302
* Fix test failures after r361278 on non-Darwin platforms and whenRichard Smith2019-05-212-4/+6
| | | | | | CLANG_DEFAULT_STDLIB is defined to libstdc++. llvm-svn: 361301
* [c++20] P0780R2: Support pack-expansion of init-captures.Richard Smith2019-05-2131-246/+544
| | | | | | | | | | | This permits an init-capture to introduce a new pack: template<typename ...T> auto x = [...a = T()] { /* a is a pack */ }; To support this, the mechanism for allowing ParmVarDecls to be packs has been extended to support arbitrary local VarDecls. llvm-svn: 361300
* [OpenMP] Add support for registering requires directives with the runtimeGheorghe-Teodor Bercea2019-05-2137-79/+247
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for the registration of the requires directives with the runtime. Each requires directive clause will enable a particular flag to be set. The set of flags is passed to the runtime to be checked for compatibility with other such flags coming from other object files. The registration function is called whenever OpenMP is present even if a requires directive is not present. This helps detect cases in which requires directives are used inconsistently. Reviewers: ABataev, AlexEichenberger, caomhin Reviewed By: ABataev, AlexEichenberger Subscribers: jholewinski, guansong, jfb, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60568 llvm-svn: 361298
* [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
OpenPOWER on IntegriCloud