llvm-project/clang-tools-extra
Yitzhak Mandelbaum 068da2c749 [clang-tidy] Allow `TransformerClangTidyCheck` clients to set the rule directly.
Adds support for setting the `Rule` field. In the process, refactors the code that accesses that field and adds a constructor that doesn't require a rule argument.

This feature is needed by checks that must set the rule *after* the check class
is constructed. For example, any check that maintains state to be accessed from
the rule needs this support. Since the object's fields are not initialized when
the superclass constructor is called, they can't be (safely) captured by a rule
passed to the existing constructor.  This patch allows constructing the check
superclass fully before setting the rule.

As a driveby fix, removed the "optional" from the rule, since rules are just a
set of cases, so empty rules are evident.

Differential Revision: https://reviews.llvm.org/D91544
2020-11-18 18:25:21 +00:00
..
clang-apply-replacements [clang-tools-extra] Prevent linking to duplicate .a libs and dylib 2020-06-17 19:00:26 +02:00
clang-change-namespace [nfc][clang-change-namespace] Remove unnecessary isScoped EnumDecl Matcher 2020-10-19 12:53:51 +01:00
clang-doc [openmp] Add missing dependencies for OMP.h.inc after d90443b 2020-06-23 11:48:04 -04:00
clang-include-fixer [clang][nearly-NFC] Remove some superfluous uses of NamedDecl::getNameAsString 2020-08-05 13:54:37 +01:00
clang-move [clang][nearly-NFC] Remove some superfluous uses of NamedDecl::getNameAsString 2020-08-05 13:54:37 +01:00
clang-query [clang-query][NFC] Silence a few lint warnings 2020-08-28 01:06:46 +01:00
clang-reorder-fields [openmp] Add missing dependencies for OMP.h.inc after d90443b 2020-06-23 11:48:04 -04:00
clang-tidy [clang-tidy] Allow `TransformerClangTidyCheck` clients to set the rule directly. 2020-11-18 18:25:21 +00:00
clangd Revert "Revert "[clangd] Implement textDocument/implementation (Xref layer)"" 2020-11-18 19:09:16 +01:00
docs Add a new altera kernel name restriction check to clang-tidy. 2020-11-09 09:26:50 -05:00
modularize clang-{tools,unittests}: Stop using SourceManager::getBuffer, NFC 2020-10-15 00:35:16 -04:00
pp-trace [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
test [clang-tidy] Make clang-format and include-order-check coherent 2020-11-17 14:54:10 +01:00
tool-template [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
unittests [clang-tidy] Merge options inplace instead of copying 2020-11-12 18:19:12 +00:00
.gitignore
CMakeLists.txt Add an explicit toggle for the static analyzer in clang-tidy 2020-09-10 10:48:17 -04:00
CODE_OWNERS.TXT [clangd] add CODE_OWNERS 2020-01-29 12:43:19 +01:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
README.txt

README.txt

//===----------------------------------------------------------------------===//
// Clang Tools repository
//===----------------------------------------------------------------------===//

Welcome to the repository of extra Clang Tools.  This repository holds tools
that are developed as part of the LLVM compiler infrastructure project and the
Clang frontend.  These tools are kept in a separate "extra" repository to
allow lighter weight checkouts of the core Clang codebase.

This repository is only intended to be checked out inside of a full LLVM+Clang
tree, and in the 'tools/extra' subdirectory of the Clang checkout.

All discussion regarding Clang, Clang-based tools, and code in this repository
should be held using the standard Clang mailing lists:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

Code review for this tree should take place on the standard Clang patch and
commit lists:
  http://lists.llvm.org/mailman/listinfo/cfe-commits

If you find a bug in these tools, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/