llvm-project/clang-tools-extra/clang-tidy
Matheus Izvekov bcd9ba2b7e
[clang] Track the templated entity in type substitution.
This is a change to how we represent type subsitution in the AST.
Instead of only storing the replaced type, we track the templated
entity we are substituting, plus an index.
We modify MLTAL to track the templated entity at each level.

Otherwise, it's much more expensive to go from the template parameter back
to the templated entity, and not possible to do in some cases, as when
we instantiate outer templates, parameters might still reference the
original entity.

This also allows us to very cheaply lookup the templated entity we saw in
the naming context and find the corresponding argument it was replaced
from, such as for implementing template specialization resugaring.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Differential Revision: https://reviews.llvm.org/D131858
2022-10-15 22:08:36 +02:00
..
abseil try to fix build after 16544cbe64 2022-09-28 15:18:15 -04:00
altera [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
android [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
boost [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
bugprone [clang-tidy] Add checker 'bugprone-suspicious-realloc-usage'. 2022-10-04 09:14:46 +02:00
cert [clang-tidy] Support C++14 in bugprone-signal-handler. 2022-08-12 09:45:53 +02:00
concurrency [clang-tidy][docs] Fix a couple of missed cases from 6e566bc552 2022-06-22 21:37:16 +01:00
cppcoreguidelines [clang-tidy] Add cppcoreguidelines-avoid-do-while check 2022-10-10 07:29:17 +00:00
darwin [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
fuchsia [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
google LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-09 04:06:52 +00:00
hicpp [clang] Track the templated entity in type substitution. 2022-10-15 22:08:36 +02:00
linuxkernel [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
llvm Use llvm::sort instead of std::sort where possible 2022-07-23 15:19:05 +02:00
llvmlibc [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
misc [clang-tidy] Ignore concepts in `misc-redundant-expression` 2022-10-08 10:37:16 +00:00
modernize [clang-tidy] Skip variadic ctors in modernize-use-equals-default 2022-09-30 22:16:28 +00:00
mpi [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
objc Use llvm::all_of (NFC) 2022-08-14 16:25:36 -07:00
openmp [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
performance [clang] Track the templated entity in type substitution. 2022-10-15 22:08:36 +02:00
plugin [clang-tidy] Fix lint warnings in clang-tidy source code (NFC) 2021-11-02 20:14:25 +13:00
portability [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
readability [clang-tidy] Use std::underlying_type_t (NFC) 2022-10-14 09:10:09 -07:00
tool Use any_of (NFC) 2022-07-22 01:05:17 -07:00
utils [clang][transformer] Finish plumbing `Note` all the way to the output. 2022-08-11 07:54:44 +02:00
zircon Use llvm::is_contained (NFC) 2022-08-27 21:21:00 -07:00
CMakeLists.txt Re-land "Cache the locations of NOLINTBEGIN/END blocks" with fix for build bot 2022-01-27 01:03:27 +13:00
ClangTidy.cpp [clang-tidy] Add `-verify-config` command line argument 2022-06-23 19:23:09 +01:00
ClangTidy.h [clang-tidy] Add `-verify-config` command line argument 2022-06-23 19:23:09 +01:00
ClangTidyCheck.cpp [clang-tidy] Add `-verify-config` command line argument 2022-06-23 19:23:09 +01:00
ClangTidyCheck.h [clang-tools-extra] Use value_or instead of getValueOr (NFC) 2022-06-19 00:13:38 -07:00
ClangTidyDiagnosticConsumer.cpp [clang-tidy] Dump effective diagnostics level in YAML output 2022-10-12 02:03:56 -07:00
ClangTidyDiagnosticConsumer.h [clang-tidy] Add `-verify-config` command line argument 2022-06-23 19:23:09 +01:00
ClangTidyForceLinker.h [clang-tidy] add concurrency module 2020-11-30 12:27:17 +03:00
ClangTidyModule.cpp [clang-tidy][NFC] Add createChecks method that also checks for LangaugeOptions 2022-05-06 17:30:34 +01:00
ClangTidyModule.h [clang-tidy][NFC] Add createChecks method that also checks for LangaugeOptions 2022-05-06 17:30:34 +01:00
ClangTidyModuleRegistry.h
ClangTidyOptions.cpp [clang-tidy] Extend spelling for CheckOptions 2022-06-23 19:59:31 +01:00
ClangTidyOptions.h [clang][clang-tools-extra] LLVM_NODISCARD => [[nodiscard]]. NFC 2022-08-09 07:11:18 +00:00
ClangTidyProfiling.cpp Don't use Optional::hasValue (NFC) 2022-06-20 11:33:56 -07:00
ClangTidyProfiling.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
ExpandModularHeadersPPCallbacks.cpp [clang][lex] NFCI: Use FileEntryRef in PPCallbacks::InclusionDirective() 2022-04-14 10:46:12 +02:00
ExpandModularHeadersPPCallbacks.h [clang][lex] NFCI: Use FileEntryRef in PPCallbacks::InclusionDirective() 2022-04-14 10:46:12 +02:00
GlobList.cpp Allow newline characters as separators for checks in Clang-Tidy configurations 2022-03-15 14:30:13 -04:00
GlobList.h [clang-tidy][NFC] Remove Tristate from CachedGlobList 2022-02-23 08:35:31 +00:00
NoLintDirectiveHandler.cpp [clang-tools-extra] Use value_or instead of getValueOr (NFC) 2022-06-19 00:13:38 -07:00
NoLintDirectiveHandler.h Re-land "Cache the locations of NOLINTBEGIN/END blocks" with fix for build bot 2022-01-27 01:03:27 +13:00
add_new_check.py [clang-tidy] Add execute perms back to add_new_check script 2022-07-27 10:41:34 +01:00
clang-tidy-config.h.cmake Add an explicit toggle for the static analyzer in clang-tidy 2020-09-10 10:48:17 -04:00
rename_check.py Fix python 2-vs-3 issues in add_new_check.py and rename_check.py 2021-09-11 09:52:50 +02:00