summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorJonas Toth <jonas.toth@gmail.com>2018-07-23 15:59:27 +0000
committerJonas Toth <jonas.toth@gmail.com>2018-07-23 15:59:27 +0000
commitfa1ea6977c37f4d6ac89907215dfa04b50f7ab8b (patch)
treed926d4d44359ecaf5e817347954c699e94a6def0 /clang/lib
parent4f4dfbacada3f33b00786bda2f13a91ad45d6ba1 (diff)
downloadbcm5719-llvm-fa1ea6977c37f4d6ac89907215dfa04b50f7ab8b.tar.gz
bcm5719-llvm-fa1ea6977c37f4d6ac89907215dfa04b50f7ab8b.zip
[ASTMatchers] add matcher for decltypeType and its underlyingType
Summary: This patch introduces a new matcher for `DecltypeType` and its underlying type in order to fix a bug in clang-tidy, see https://reviews.llvm.org/D48717 for more. Reviewers: aaron.ballman, alexfh, NoQ, dcoughlin Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48759 llvm-svn: 337703
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/ASTMatchers/ASTMatchersInternal.cpp1
-rw-r--r--clang/lib/ASTMatchers/Dynamic/Registry.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/ASTMatchers/ASTMatchersInternal.cpp b/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
index d8af47d7505..0c5902d20c2 100644
--- a/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
+++ b/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
@@ -800,6 +800,7 @@ const AstTypeMatcher<IncompleteArrayType> incompleteArrayType;
const AstTypeMatcher<VariableArrayType> variableArrayType;
const AstTypeMatcher<AtomicType> atomicType;
const AstTypeMatcher<AutoType> autoType;
+const AstTypeMatcher<DecltypeType> decltypeType;
const AstTypeMatcher<FunctionType> functionType;
const AstTypeMatcher<FunctionProtoType> functionProtoType;
const AstTypeMatcher<ParenType> parenType;
diff --git a/clang/lib/ASTMatchers/Dynamic/Registry.cpp b/clang/lib/ASTMatchers/Dynamic/Registry.cpp
index 769d985c054..5a01c5d1f94 100644
--- a/clang/lib/ASTMatchers/Dynamic/Registry.cpp
+++ b/clang/lib/ASTMatchers/Dynamic/Registry.cpp
@@ -188,6 +188,7 @@ RegistryMaps::RegistryMaps() {
REGISTER_MATCHER(decayedType);
REGISTER_MATCHER(decl);
REGISTER_MATCHER(declaratorDecl);
+ REGISTER_MATCHER(decltypeType);
REGISTER_MATCHER(declCountIs);
REGISTER_MATCHER(declRefExpr);
REGISTER_MATCHER(declStmt);
OpenPOWER on IntegriCloud