summaryrefslogtreecommitdiffstats
path: root/clang/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support of the next Ubuntu (Ubuntu 20.04 - Focal Fossa)Sylvestre Ledru2019-11-161-1/+2
|
* Avoid including Builtins.h in Preprocessor.hReid Kleckner2019-11-152-5/+6
| | | | | | Builtins are rarely if ever accessed via the Preprocessor. They are typically found on the ASTContext, so there should be no performance penalty to using a pointer indirection to store the builtin context.
* Don't use end-of-line comments for the DebugInfoKind enum, NFCReid Kleckner2019-11-151-18/+24
| | | | These are long comments, and I find the new structure easier to read.
* Revert "re-land [DebugInfo] Add debug location to stubs generated by ↵Alexandre Ganea2019-11-151-1/+0
| | | | | | CGDeclCXX and mark them as artificial" This reverts commit 9c1baa23526c6d7d06eafefbf82d73bfe9bb3aaf.
* re-land [DebugInfo] Add debug location to stubs generated by CGDeclCXX and ↵Alexandre Ganea2019-11-151-0/+1
| | | | | | mark them as artificial Differential Revision: https://reviews.llvm.org/D66328
* [OpenMP 5.0] - Extend defaultmap, by Chi Chun Chen.cchen2019-11-152-0/+14
| | | | | | | | | | | | | | | | | Summary: For the extended defaultmap, most of the work is inside sema. The only difference for codegen is to set different initial maptype for different implicit-behavior. Reviewers: jdoerfert, ABataev Reviewed By: ABataev Subscribers: dreachem, sandoval, cfe-commits Tags: #clang, #openmp Differential Revision: https://reviews.llvm.org/D69204
* [AST] Let DeclarationNameInfo printing use PrintingPolicy, and fix ↵Sam McCall2019-11-151-7/+3
| | | | const-correctness
* [clang-format] Flexible line endingsCameron Desrochers2019-11-151-0/+10
| | | | | | | | | Line ending detection is now set with the `DeriveLineEnding` option. CRLF can now be used as the default line ending by setting `UseCRLF`. When line ending detection is disabled, all line endings are converted according to the `UseCRLF` option. Differential Revision: https://reviews.llvm.org/D19031
* Implement target(branch-protection) attribute for AArch64Momchil Velikov2019-11-156-4/+34
| | | | | | | | | This patch implements `__attribute__((target("branch-protection=...")))` in a manner, compatible with the analogous GCC feature: https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/AArch64-Function-Attributes.html#AArch64-Function-Attributes Differential Revision: https://reviews.llvm.org/D68711
* Include the mangled name in -ast-dump=jsonAlex Richardson2019-11-151-3/+6
| | | | | | | | | | | | | | | | | | | | I am planning to use this feature to make update_cc_test_checks.py less fragile by obtaining the mangled names directly from -ast-dump=json. Currently, it uses c-index-test which ignores the -triple=, etc. arguments that are in the RUN: line and therefore does not generate checks for some targets. The AST dump tests were updated using the following command: `python $LLVM_BINDIR/gen_ast_dump_json_test.py --update --source $LLVM_SRC/clang/test/AST/*-json.*` Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: rsmith, MaskRay, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69564
* [ARM,MVE] Add intrinsics for vector get/set lane.Simon Tatham2019-11-152-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the `vgetq_lane` and `vsetq_lane` families, to copy between a scalar and a specified lane of a vector. One of the new `vgetq_lane` intrinsics returns a `float16_t`, which causes a compile error if `%clang_cc1` doesn't get the option `-fallow-half-arguments-and-returns`. The driver passes that option to cc1 already, but I've had to edit all the explicit cc1 command lines in the existing MVE intrinsics tests. A couple of fixes are included for the code I wrote up front in MveEmitter to support lane-index immediates (and which nothing has tested until now): the type was wrong (`uint32_t` instead of `int`) and the range was off by one. I've also added a method of bypassing the default promotion to `i32` that is done by the MveEmitter code generation: it's sensible to promote short scalars like `i16` to `i32` if they're going to be passed to custom IR intrinsics representing a machine instruction operating on GPRs, but not if they're going to be passed to standard IR operations like `insertelement` which expect the exact type. Reviewers: ostannard, MarkMurrayARM, dmgreen Reviewed By: dmgreen Subscribers: kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70188
* [ARM,MVE] Add intrinsics for 'administrative' vector operations.Simon Tatham2019-11-152-6/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This batch of intrinsics includes lots of things that move vector data around or change its type without really affecting its value very much. It includes the `vreinterpretq` family (cast one vector type to another); `vuninitializedq` (create a vector of a given type with don't-care contents); and `vcreateq` (make a 128-bit vector out of two `uint64_t` halves). These are all implemented using completely standard IR that's already tested in existing LLVM unit tests, so I've just written a clang test to check the IR is correct, and left it at that. I've also added some richer infrastructure to the MveEmitter Tablegen backend, to make it specify the exact integer type of integer arguments passed to IR construction functions, and wrap those arguments in a `static_cast` in the autogenerated C++. That was necessary to prevent an overloading ambiguity when passing the integer literal `0` to `IRBuilder::CreateInsertElement`, because otherwise, it could mean either a null pointer `llvm::Value *` or a zero `uint64_t`. Reviewers: ostannard, MarkMurrayARM, dmgreen Subscribers: kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70133
* [BPF] Restrict preserve_access_index attribute to C onlyYonghong Song2019-11-141-0/+1
| | | | | | | | | | | | This patch is a follow-up for commit 4e2ce228ae79 [BPF] Add preserve_access_index attribute for record definition to restrict attribute for C only. A new test case is added to check for this restriction. Additional code polishing is done based on Aaron Ballman's suggestion in https://reviews.llvm.org/D69759/new/. Differential Revision: https://reviews.llvm.org/D70257
* [WebAssembly] -fwasm-exceptions enables reference-typesHeejin Ahn2019-11-131-0/+2
| | | | | | | | | | | | | | | Summary: This adds `-mreference-types` and `-mno-reference-types` flags to clang and make `-fwasm-exceptions` enables reference types feature in clang and the backend. Reviewers: tlively Subscribers: dschuff, sbc100, jgravelle-google, sunfish, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69832
* [BPF] Add preserve_access_index attribute for record definitionYonghong Song2019-11-132-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a resubmission for the previous reverted commit 943436040121 with the same subject. This commit fixed the segfault issue and addressed additional review comments. This patch introduced a new bpf specific attribute which can be added to struct or union definition. For example, struct s { ... } __attribute__((preserve_access_index)); union u { ... } __attribute__((preserve_access_index)); The goal is to simplify user codes for cases where preserve access index happens for certain struct/union, so user does not need to use clang __builtin_preserve_access_index for every members. The attribute has no effect if -g is not specified. When the attribute is specified and -g is specified, any member access defined by that structure or union, including array subscript access and inner records, will be preserved through __builtin_preserve_{array,struct,union}_access_index() IR intrinsics, which will enable relocation generation in bpf backend. The following is an example to illustrate the usage: -bash-4.4$ cat t.c #define __reloc__ __attribute__((preserve_access_index)) struct s1 { int c; } __reloc__; struct s2 { union { struct s1 b[3]; }; } __reloc__; struct s3 { struct s2 a; } __reloc__; int test(struct s3 *arg) { return arg->a.b[2].c; } -bash-4.4$ clang -target bpf -g -S -O2 t.c A relocation with access string "0:0:0:0:2:0" will be generated representing access offset of arg->a.b[2].c. forward declaration with attribute is also handled properly such that the attribute is copied and populated in real record definition. Differential Revision: https://reviews.llvm.org/D69759
* [ARM,MVE] Add intrinsics for contiguous load/stores.Simon Tatham2019-11-132-6/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the ACLE intrinsics for all the MVE load and store instructions not already handled by D69791. These ones don't need new IR intrinsics, because they can be implemented in terms of standard LLVM IR constructions. Some of the load and store instructions access less than 128 bits of memory, sign/zero extending each value to a wider vector lane on load or truncating it on store. These are represented in IR by a load of a shorter vector followed by a zext/sext, and conversely, a trunc followed by a short store. Existing ISel patterns already recognize those combinations and turn them into the right MVE instructions. The predicated forms of all these instructions are represented in the same way, except that the ordinary load/store operation is replaced with the existing intrinsics @llvm.masked.{load,store}. These are currently only code-generated as predicated MVE load/store instructions if you give LLVM the `-enable-arm-maskedldst` option; so I've done that in the LLVM codegen test. When we make that the default, that option can be removed. In the Tablegen backend, I've had to add a handful of extra support features: * We need to be able to make clang::Address objects out of a pointer and an alignment (previously we only needed these when the user passed us an existing one). * We can now specify vector types that aren't 128 bits wide (for use in those intermediate values in IR), the parametrized type system can make one starting from two existing vector types (using the lane count of one and the element type of the other). * I've added support for code generation of pointer casts, and for specifying LLVM types as operands to IRBuilder operations (for zext and sext, though I think they'll come in useful again). * Now not all IR construction operations need to be specified as Builder.CreateFoo; some don't involve a Builder at all, and one passes it as a parameter to a tiny static helper function in CGBuiltin.cpp. Reviewers: ostannard, MarkMurrayARM, dmgreen Subscribers: kristof.beyls, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D70088
* Add -Wtautological-compare to -WallWeverything2019-11-121-0/+1
| | | | | | | | Some warnings in -Wtautological-compare subgroups are DefaultIgnore. Adding this group to -Wmost, which is part of -Wall, will aid in their discoverability. Differential Revision: https://reviews.llvm.org/D69292
* Allow additional file suffixes/extensions considered as source in main ↵mydeveloperday2019-11-122-0/+24
| | | | | | | | | | | | | | | | | | | | | include grouping Summary: By additional regex match, grouping of main include can be enabled in files that are not normally considered as a C/C++ source code. For example, this might be useful in templated code, where template implementations are being held in *Impl.hpp files. On the occassion, 'assume-filename' option description was reworded as it was misleading. It has nothing to do with `style=file` option and it does not influence sourced style filename. Reviewers: rsmith, ioeric, krasimir, sylvestre.ledru, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: MyDeveloperDay, cfe-commits Patch by: furdyna Tags: #clang Differential Revision: https://reviews.llvm.org/D67750
* [Analyzer] Use a reference in a range-based forMark de Wever2019-11-121-1/+1
| | | | | | | | | Let the checkers use a reference instead of a copy in a range-based for loop. This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D70047
* [AST] Use an explicit copy in a range-based forMark de Wever2019-11-123-3/+3
| | | | | | | | | The AssociationIteratorTy type will be copied in a range-based for loop. Make the copy explicit to avoid the -Wrange-loop-analysis warning. This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D70045
* clang/Modules: Error if ReadASTBlock does not find the main moduleDuncan P. N. Exon Smith2019-11-122-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | If ReadASTBlock does not find its top-level submodule, there's something wrong the with the PCM. Error in that case, to avoid hitting problems further from the source. Note that the Swift compiler sometimes hits a case in CompilerInstance::loadModule where the top-level submodule mysteriously does not have Module::IsFromModuleFile set. That will emit a confusing warn_missing_submodule, which was never intended for the main module. The recent audit of error-handling in ReadAST may have rooted out the real problem. If not, this commit will help to clarify the real problem, and replace a confusing warning with an error pointing at the malformed PCM file. We're specifically sniffing out whether the top-level submodule was found/processed, in case there is a malformed module file that is missing it. If there is an error encountered during ReadSubmoduleBlock the return status should already propagate through. It would be nice to detect other missing submodules around here to catch other instances of warn_missing_submodule closer to the source, but that's left as a future exercise. https://reviews.llvm.org/D70063
* clang/Modules: Delay err_module_file_conflict if a diagnostic is in flightDuncan P. N. Exon Smith2019-11-112-2/+9
| | | | | | | As part of an audit of whether all errors are being reported from the ASTReader, delay err_module_file_conflict if a diagnostic is already in flight when it is hit. This required plumbing an extra argument through the delayed diagnostic mechanics in DiagnosticsEngine.
* [OPENMP50]Generalize handling of context matching/scoring.Alexey Bataev2019-11-115-58/+95
| | | | | | | | | | | | | | Summary: Untie context matching/scoring from the attribute for declare variant directive to simplify future uses in other context-dependent directives. Reviewers: jdoerfert Subscribers: guansong, kkwli0, caomhin, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69952
* [OPENMP50]Add support for nested atomic and simd constructs inAlexey Bataev2019-11-111-1/+1
| | | | | | | | simd-based directives. According to OpenMP 5.0 standard, ordered simd, atomic and simd directives are allowed as nested directives in the simd-based directives.
* [libTooling] Further simplify `Stencil` type and introduce `MatchComputation`.Yitzhak Mandelbaum2019-11-113-53/+54
| | | | | | | | | | | | | | | | | | | | Summary: This revision introduces a new interface `MatchComputation` which generalizes the `Stencil` interface and replaces the `std::function` interface of `MatchConsumer`. With this revision, `Stencil` (as an abstraction) becomes just one collection of implementations of `MatchComputation<std::string>`. Correspondingly, we remove the `Stencil` class entirely in favor of a simple type alias, deprecate `MatchConsumer` and change all functions that accepted `MatchConsumer<std::string>` to use `MatchComputation<std::string>` instead. Reviewers: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69802
* clang/Modules: Remove unused parameter from ModuleManager::removeModulesDuncan P. N. Exon Smith2019-11-101-3/+1
| | | | | | The other paremeters appear to be sufficient to determine which modules have just been loaded and need to be removed, so stop collecting and sending in that set explicitly.
* [Diagnostics] Try to improve warning message for -Wreturn-typeDávid Bolvanský2019-11-091-8/+9
| | | | | | | | | | | | | | Summary: I agree with https://easyaspi314.github.io/gcc-vs-clang.html?fbclid=IwAR1VA0qxiWVUusOQUv5z7JESS7ZpeJy-UqAI5mnJscofGLqXcqeErIUB2gU, current warning message is not very good. We should try to improve it.. Reviewers: rsmith, aaron.ballman, easyaspi314 Reviewed By: aaron.ballman Subscribers: arphaman, Quuxplusone, mehdi_amini, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D69762
* Revert "[BPF] Add preserve_access_index attribute for record definition"Yonghong Song2019-11-093-19/+0
| | | | | | This reverts commit 4a5aa1a7bf8b1714b817ede8e09cd28c0784228a. There are some other test failures. Investigate them first.
* [BPF] Add preserve_access_index attribute for record definitionYonghong Song2019-11-093-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduced a new bpf specific attribute which can be added to struct or union definition. For example, struct s { ... } __attribute__((preserve_access_index)); union u { ... } __attribute__((preserve_access_index)); The goal is to simplify user codes for cases where preserve access index happens for certain struct/union, so user does not need to use clang __builtin_preserve_access_index for every members. The attribute has no effect if -g is not specified. When the attribute is specified and -g is specified, any member access defined by that structure or union, including array subscript access and inner records, will be preserved through __builtin_preserve_{array,struct,union}_access_index() IR intrinsics, which will enable relocation generation in bpf backend. The following is an example to illustrate the usage: -bash-4.4$ cat t.c #define __reloc__ __attribute__((preserve_access_index)) struct s1 { int c; } __reloc__; struct s2 { union { struct s1 b[3]; }; } __reloc__; struct s3 { struct s2 a; } __reloc__; int test(struct s3 *arg) { return arg->a.b[2].c; } -bash-4.4$ clang -target bpf -g -S -O2 t.c A relocation with access string "0:0:0:0:2:0" will be generated representing access offset of arg->a.b[2].c. forward declaration with attribute is also handled properly such that the attribute is copied and populated in real record definition. Differential Revision: https://reviews.llvm.org/D69759
* [Parser] Warn when ScopeDepthOrObjCQuals overflowsMark de Wever2019-11-092-1/+9
| | | | | | | | | Before when the overflow occured an assertion was triggered. Now check whether the maximum has been reached and warn properly. This patch fixes the original submission of PR19607. Differential Revision: https://reviews.llvm.org/D63975
* [NFC] Supress GCC "Bitfield too small to hold all values of enum" warning.Richard Smith2019-11-091-1/+7
| | | | | | Patch by Wang Tianqing! Differential Revision: https://reviews.llvm.org/D69792
* Revert "Reland "[clang] Report sanitizer blacklist as a dependency in cc1""Jan Korous2019-11-082-2/+5
| | | | This reverts commit cae4a28864f4e8a55920e2b94e2cd43617902dec.
* Reland "[clang] Report sanitizer blacklist as a dependency in cc1"Jan Korous2019-11-082-5/+2
| | | | This reverts commit 3182027282c59c51d5080d83365917fccd695854.
* Reland "[clang] Report sanitizer blacklist as a dependency in cc1"Jan Korous2019-11-082-2/+5
| | | | This reverts commit 9b8413ac6e56e7a6e0ba884773d13bcf9414bd43.
* [clang-format] NFC allow Format.h to be clang-formatted but still maintain ↵paul_hoad2019-11-081-5/+11
| | | | | | | | | | | | | | | | | | | | | the same doc layout in ClangFormatStyleOptions.rst Summary: Format.h is used to generate ClangFormatStyleOptions.rst, the layout of the comments is critical to the rst file. Accidentally clang-formatting Format.h can lead to the .rst changing. This revision simply add // clang-format off/on statement around the areas who formatting needs to be maintained, mainly around the options that are related to what happens when the line breaks due to `ColumnLimit` (which is what is happening to the comment) This allows Format.h to be clang-formatted without causing a change in the documentation when dump_format_style.py is rerun, which is also part of the revision. Reviewers: mitchell-stellar, klimek, sammccall, owenpan Reviewed By: mitchell-stellar Subscribers: cfe-commits Tags: #clang, #clang-format Differential Revision: https://reviews.llvm.org/D69951
* [clang] Add VFS support for sanitizers' blacklistsJan Korous2019-11-081-2/+5
| | | | Differential Revision: https://reviews.llvm.org/D69648
* Redeclare Objective-C property accessors inside the ObjCImplDecl in which ↵Adrian Prantl2019-11-082-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | they are synthesized. This patch is motivated by (and factored out from) https://reviews.llvm.org/D66121 which is a debug info bugfix. Starting with DWARF 5 all Objective-C methods are nested inside their containing type, and that patch implements this for synthesized Objective-C properties. 1. SemaObjCProperty populates a list of synthesized accessors that may need to inserted into an ObjCImplDecl. 2. SemaDeclObjC::ActOnEnd inserts forward-declarations for all accessors for which no override was provided into their ObjCImplDecl. This patch does *not* synthesize AST function *bodies*. Moving that code from the static analyzer into Sema may be a good idea though. 3. Places that expect all methods to have bodies have been updated. I did not update the static analyzer's inliner for synthesized properties to point back to the property declaration (see test/Analysis/Inputs/expected-plists/nullability-notes.m.plist), which I believed to be more bug than a feature. Differential Revision: https://reviews.llvm.org/D68108 rdar://problem/53782400
* Revert "Revert "Revert "[clang] Report sanitizer blacklist as a dependency ↵Abel Kocsis2019-11-082-5/+2
| | | | | | in cc1""" This reverts commit 3182027282c59c51d5080d83365917fccd695854.
* Revert "Revert "[clang] Report sanitizer blacklist as a dependency in cc1""Abel Kocsis2019-11-082-2/+5
| | | | This reverts commit 6b45e1bc11e91ea7b57a6ab1c19461a86dba33f8.
* Revert "[clang] Report sanitizer blacklist as a dependency in cc1"Jeremy Morse2019-11-082-5/+2
| | | | | | | | | | This reverts commit 03b84e4f6d0e1c04f22d69cc445f36e1f713beb4. This breaks dfsan tests with a linking failure, in for example this build: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/24312 Reverting this patch locally makes those tests succeed.
* [Analyzer] Checker for Debugging Iterator CheckersAdam Balogh2019-11-081-0/+5
| | | | | | | | | For white-box testing correct container and iterator modelling it is essential to access the internal data structures stored for container and iterators. This patch introduces a simple debug checkers called debug.IteratorDebugging to achieve this. Differential Revision: https://reviews.llvm.org/D67156
* [SEH] Defer checking filter expression types until instantiatonReid Kleckner2019-11-071-1/+1
| | | | | | | | | | | While here, wordsmith the error a bit. Now clang says: error: filter expression has non-integral type 'Foo' Fixes PR43779 Reviewers: amccarth Differential Revision: https://reviews.llvm.org/D69969
* [clang] Report sanitizer blacklist as a dependency in cc1Jan Korous2019-11-072-2/+5
| | | | | | | | Previously these were reported from the driver which blocked clang-scan-deps from getting the full set of dependencies from cc1 commands. Also the default sanitizer blacklist that is added in driver was never reported as a dependency. I introduced -fsanitize-system-blacklist cc1 option to keep track of which blacklists were user-specified and which were added by driver and clang -MD now also reports system blacklists as dependencies. Differential Revision: https://reviews.llvm.org/D69290
* [clang] Add -fdebug-default-version for specifying the default DWARF versionDavid Blaikie2019-11-071-0/+2
| | | | | | | | | | This flag decouples specifying the DWARF version from enabling/disabling DWARF in general (or the gN level - gmlt/limited/standalone, etc) while still allowing existing -gdwarf-N flags to override this default. Patch by Caroline Tice! Differential Revision: https://reviews.llvm.org/D69822
* Fix warning about unused std::unique result, erase shifted elementsReid Kleckner2019-11-071-8/+11
| | | | | This is actually a functional change. I haven't added any new test coverage. I'm just trying to fix the warning and hoping for the best.
* Add support for options -frounding-math, ftrapping-math, -ffp-model=, and ↵Melanie Blower2019-11-073-1/+36
| | | | | | | | | | | | -ffp-exception-behavior= Add options to control floating point behavior: trapping and exception behavior, rounding, and control of optimizations that affect floating point calculations. More details in UsersManual.rst. Reviewers: rjmccall Differential Revision: https://reviews.llvm.org/D62731
* [clang-format] [NFC] update the documentation in Format.h to allow ↵paulhoad2019-11-061-18/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dump_format_style.py to get a little closer to being correct. (part 2) Summary: a change {D67541} cause LanguageStandard to now be subtly different from all other clang-format options, in that the Enum value (less the prefix) is not always allowed as valid as the configuration option. This caused the ClangFormatStyleOptions.rst and the Format.h to diverge so that the ClangFormatStyleOptions.rst could no longer be generated from the Format.h using dump_format_stlye.py This fix tried to remedy that: 1) by allowing an additional comment (in Format.h) after the enum to be used as the `in configuration ( XXXX )` text, and changing the dump_format_style.py to support that. This makes the following code: ``` enum { ... LS_Cpp03, // c++03 LS_Cpp11, // c++11 ... }; ``` would render as: ```* ``LS_Cpp03`` (in configuration: ``c++03``) * ``LS_Cpp11`` (in configuration: ``c++11``) ``` And we also move the deprecated alias into the text of the enum (otherwise it won't be added at the end as an option) This patch includes a couple of other whitespace changes which help bring Format.h and ClangFormatStyleOptions.rst almost back into line and regeneratable... (there is still one more) Reviewers: klimek, mitchell-stellar, sammccall Reviewed By: mitchell-stellar, sammccall Subscribers: mrexodia, cfe-commits Tags: #clang, #clang-format Differential Revision: https://reviews.llvm.org/D69433
* [libTooling] Small changes in Transformer API.Yitzhak Mandelbaum2019-11-062-10/+20
| | | | | | | | | | | | | | | | | Summary: * Rename `transformer::change` to `transformer::changeTo`, make `change` forward to `changeTo` and mark it deprecated. * Mark `transformer::text` and `transformer::selection` deprecated and migrate references to them in tests. Reviewers: ilya-biryukov Subscribers: gribozavr, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69896
* [libTooling] Simplify type structure of `Stencil`s.Yitzhak Mandelbaum2019-11-061-127/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently, stencils are defined as a sequence of `StencilParts`. This differentiation adds an unneeded layer of complexity to the definition of Stencils. This change significantly simplifies the type structure: a stencil is now conceptually any object implementing `StencilInterface` and `Stencil` is just a thin wrapper for pointers to this interface. To account for the sequencing that was supported by the old `Stencil` type, we introduce a sequencing class that implements `StencilInterface`. That is, sequences are just another kind of Stencil and no longer have any special status. Corresponding to this change in the type structure, we change the way `cat` is used (and defined). `cat` bundles multiple features: it builds a stencil from a sequence of subcomponents and admits multiple different types for its arguments, while coercing them into the right type. Previously, `cat` was also used to coerce a single `StencilPart` into a `Stencil`. With that distinction gone, many uses of `cat` (e.g. in the tests) are unnecessary and have, therefore, been removed. Reviewers: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69613
* NeonEmitter: remove special 'a' type modifier.Tim Northover2019-11-062-10/+15
| | | | | | | | 'a' used to implement a splat in C++ code in NeonEmitter.cpp, but this can be done directly from .td expansions now (and most ops already did). So removing it simplifies the overall code. https://reviews.llvm.org/D69716
OpenPOWER on IntegriCloud