summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorJonas Toth <jonas.toth@gmail.com>2018-09-11 16:09:19 +0000
committerJonas Toth <jonas.toth@gmail.com>2018-09-11 16:09:19 +0000
commit2253878a40594751eb4d9ea3dd00d3d596836bd2 (patch)
tree3d42d75e9123e3c68a74f3e9680a206671f3e403 /clang/lib
parente2da5c525ed05837c6e9e45c58738a9e8794d084 (diff)
downloadbcm5719-llvm-2253878a40594751eb4d9ea3dd00d3d596836bd2.tar.gz
bcm5719-llvm-2253878a40594751eb4d9ea3dd00d3d596836bd2.zip
[ASTMatchers] add three matchers for dependent expressions
Summary: The new matchers can be used to check if an expression is type-, value- or instantiation-dependent in a templated context. These matchers are used in a clang-tidy check and generally useful as the problem of unresolved templates occurs more often in clang-tidy and they provide an easy way to check for this issue. Reviewers: aaron.ballman, alexfh, klimek Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51880 llvm-svn: 341958
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/ASTMatchers/Dynamic/Registry.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/ASTMatchers/Dynamic/Registry.cpp b/clang/lib/ASTMatchers/Dynamic/Registry.cpp
index 4cf70f94c78..e2f4adb0102 100644
--- a/clang/lib/ASTMatchers/Dynamic/Registry.cpp
+++ b/clang/lib/ASTMatchers/Dynamic/Registry.cpp
@@ -357,6 +357,7 @@ RegistryMaps::RegistryMaps() {
REGISTER_MATCHER(isExpansionInSystemHeader);
REGISTER_MATCHER(isInteger);
REGISTER_MATCHER(isIntegral);
+ REGISTER_MATCHER(isInstantiationDependent);
REGISTER_MATCHER(isInTemplateInstantiation);
REGISTER_MATCHER(isLambda);
REGISTER_MATCHER(isListInitialization);
@@ -376,8 +377,10 @@ RegistryMaps::RegistryMaps() {
REGISTER_MATCHER(isStaticStorageClass);
REGISTER_MATCHER(isStruct);
REGISTER_MATCHER(isTemplateInstantiation);
+ REGISTER_MATCHER(isTypeDependent);
REGISTER_MATCHER(isUnion);
REGISTER_MATCHER(isUnsignedInteger);
+ REGISTER_MATCHER(isValueDependent);
REGISTER_MATCHER(isVariadic);
REGISTER_MATCHER(isVirtual);
REGISTER_MATCHER(isVirtualAsWritten);
OpenPOWER on IntegriCloud