llvm-project/clang-tools-extra/clang-tidy/utils
Yitzhak Mandelbaum 33f35a4b79 [clang-tidy] Fix `TransformerClangTidyCheck`'s handling of include insertions.
Currently, all include insertions are directed to the main file. However,
Transformer rules can specify alternative destinations for include
insertions. This patch fixes the code to associate the include with the correct
file.

This patch was tested manually. The clang tidy unit test framework does not
support testing changes to header files. Given that this is a bug fix for a live
bug, the patch relies on manual testing rather than blocking on upgrading the
unit test framework.

Differential Revision: https://reviews.llvm.org/D96542
2021-02-12 16:23:53 +00:00
..
ASTUtils.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
ASTUtils.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Aliasing.cpp [clang-tidy] New util `Aliasing` factored out from `bugprone-infinite-loop` 2020-07-01 09:04:27 +02:00
Aliasing.h [clang-tidy] New util `Aliasing` factored out from `bugprone-infinite-loop` 2020-07-01 09:04:27 +02:00
CMakeLists.txt [clang-tidy] New util `Aliasing` factored out from `bugprone-infinite-loop` 2020-07-01 09:04:27 +02:00
DeclRefExprUtils.cpp [clang-tidy] Use new mapping matchers 2021-02-03 23:21:17 +00:00
DeclRefExprUtils.h [clang-tidy] Prune dead code. NFC. 2020-06-17 21:16:59 +02:00
ExceptionAnalyzer.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
ExceptionAnalyzer.h NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
ExprSequence.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
ExprSequence.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FileExtensionsUtils.cpp [clang-tidy] New check: bugprone-suspicious-include 2020-03-12 09:59:28 -06:00
FileExtensionsUtils.h [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
FixItHintUtils.cpp Fix MSVC "not all control paths return a value" warning. NFCI. 2020-01-06 10:20:20 +00:00
FixItHintUtils.h [clang-tidy] Prune dead code. NFC. 2020-06-17 21:16:59 +02:00
HeaderGuard.cpp Replace comment by private method; NFC. 2020-07-26 13:59:45 -04:00
HeaderGuard.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
IncludeInserter.cpp Remove old create(MainFile)?IncludeInsertion overloads 2020-10-09 15:24:57 +02:00
IncludeInserter.h [clang-tidy] Fix IncludeInserter usage example in a comment. 2020-10-12 15:05:42 +02:00
IncludeSorter.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
IncludeSorter.h Support ObjC in IncludeInserter 2020-10-16 04:12:32 +02:00
LexerUtils.cpp Avoid SourceManager.h include in RawCommentList.h, add missing incs 2020-02-27 13:49:40 -08:00
LexerUtils.h [clang-tidy] implement utility-function to add 'const' to variables 2020-01-03 20:37:47 +01:00
Matchers.h [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified. 2020-12-10 16:58:17 -05:00
NamespaceAliaser.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
NamespaceAliaser.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
OptionsUtils.cpp [NFC] Tweak OptionsUtils 2020-03-10 12:50:58 +00:00
OptionsUtils.h Remove \brief commands from doxygen comments. 2019-08-22 11:32:57 +00:00
RenamerClangTidyCheck.cpp [clang-tidy] Fix RenamerClangTidy checks trying to emit a fix that isnt a valid identifier 2020-11-23 20:04:51 +00:00
RenamerClangTidyCheck.h [clang-tidy] Fix RenamerClangTidy checks trying to emit a fix that isnt a valid identifier 2020-11-23 20:04:51 +00:00
TransformerClangTidyCheck.cpp [clang-tidy] Fix `TransformerClangTidyCheck`'s handling of include insertions. 2021-02-12 16:23:53 +00:00
TransformerClangTidyCheck.h [clang-tidy] Allow `TransformerClangTidyCheck` clients to set the rule directly. 2020-11-18 18:25:21 +00:00
TypeTraits.cpp [clang-tidy] New checker performance-trivially-destructible-check 2019-11-01 16:16:49 +01:00
TypeTraits.h [clang-tidy] New checker performance-trivially-destructible-check 2019-11-01 16:16:49 +01:00
UsingInserter.cpp [ASTMatchers] StringRef'ify hasName 2020-01-29 10:53:08 +01:00
UsingInserter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00