llvm-project/clang-tools-extra/clang-tidy/performance
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
..
CMakeLists.txt
FasterStringFindCheck.cpp [clang-tidy][NFC] Replace many instances of std::string where a StringRef would suffice. 2022-05-09 12:01:46 +01:00
FasterStringFindCheck.h [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
ForRangeCopyCheck.cpp [clang-tidy] performance-for-range-copy: Don't trigger on implicit type conversions. 2021-03-02 20:02:48 -05:00
ForRangeCopyCheck.h [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
ImplicitConversionInLoopCheck.cpp [clang-tidy] Fix lint warnings in clang-tidy source code (NFC) 2021-11-02 20:14:25 +13:00
ImplicitConversionInLoopCheck.h [clang-tidy] Fix lint warnings in clang-tidy source code (NFC) 2021-11-02 20:14:25 +13:00
InefficientAlgorithmCheck.cpp Use StringRef::contains (NFC) 2022-08-28 23:29:02 -07:00
InefficientAlgorithmCheck.h [clang-tidy] Simplify inefficient algorithm check 2021-02-17 10:19:44 +00:00
InefficientStringConcatenationCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
InefficientStringConcatenationCheck.h [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
InefficientVectorOperationCheck.cpp [clang-tidy][NFC] Replace many instances of std::string where a StringRef would suffice. 2022-05-09 12:01:46 +01:00
InefficientVectorOperationCheck.h [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
MoveConstArgCheck.cpp [clang-tidy] add option performance-move-const-arg.CheckMoveToConstRef 2022-02-10 13:31:07 +00:00
MoveConstArgCheck.h [clang-tidy] add option performance-move-const-arg.CheckMoveToConstRef 2022-02-10 13:31:07 +00:00
MoveConstructorInitCheck.cpp [clang-tidy][NFC] Tweak some generation of diag messages 2021-02-26 19:10:25 +00:00
MoveConstructorInitCheck.h [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
NoAutomaticMoveCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
NoAutomaticMoveCheck.h [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
NoIntToPtrCheck.cpp
NoIntToPtrCheck.h [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
NoexceptMoveConstructorCheck.cpp [clang-tidy] NoexceptMoveConstructorCheck::check - use castAs<> instead of getAs<> to avoid dereference of nullptr 2022-02-12 10:57:09 +00:00
NoexceptMoveConstructorCheck.h
PerformanceTidyModule.cpp
TriviallyDestructibleCheck.cpp
TriviallyDestructibleCheck.h [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00
TypePromotionInMathFnCheck.cpp [clang-tidy] Add a Standalone diagnostics mode to clang-tidy 2022-04-16 09:53:35 +01:00
TypePromotionInMathFnCheck.h [clang-tools-extra] Fixed a number of typos 2022-08-01 15:32:25 +02:00
UnnecessaryCopyInitialization.cpp [clang] Track the templated entity in type substitution. 2022-10-15 22:08:36 +02:00
UnnecessaryCopyInitialization.h [clang-tidy][NFC] Replace many instances of std::string where a StringRef would suffice. 2022-05-09 12:01:46 +01:00
UnnecessaryValueParamCheck.cpp Fix `performance-unnecessary-value-param` for template specialization 2022-05-30 09:55:53 +08:00
UnnecessaryValueParamCheck.h [clang-tidy] Organize check doc files into subdirectories (NFC) 2022-06-16 16:06:20 -06:00