summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp')
-rw-r--r--gnu/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp b/gnu/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp
index 49b15ee6850..02aee4b46dd 100644
--- a/gnu/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp
+++ b/gnu/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp
@@ -734,7 +734,10 @@ private:
BoundNodesTreeBuilder *Builder) {
const Type *const CanonicalType =
ActiveASTContext->getCanonicalType(TypeNode);
- for (const TypedefNameDecl *Alias : TypeAliases.lookup(CanonicalType)) {
+ auto Aliases = TypeAliases.find(CanonicalType);
+ if (Aliases == TypeAliases.end())
+ return false;
+ for (const TypedefNameDecl *Alias : Aliases->second) {
BoundNodesTreeBuilder Result(*Builder);
if (Matcher.matches(*Alias, this, &Result)) {
*Builder = std::move(Result);