diff options
Diffstat (limited to 'clang/include/clang/ASTMatchers/ASTMatchersInternal.h')
-rw-r--r-- | clang/include/clang/ASTMatchers/ASTMatchersInternal.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/include/clang/ASTMatchers/ASTMatchersInternal.h b/clang/include/clang/ASTMatchers/ASTMatchersInternal.h index a77611001fb1..ab7a445dbcd4 100644 --- a/clang/include/clang/ASTMatchers/ASTMatchersInternal.h +++ b/clang/include/clang/ASTMatchers/ASTMatchersInternal.h @@ -1090,6 +1090,12 @@ private: if (const auto *S = dyn_cast<ElaboratedType>(&Node)) { return matchesSpecialized(S->desugar(), Finder, Builder); } + // Similarly types found via using declarations. + // These are *usually* meaningless sugar, and this matches the historical + // behavior prior to the introduction of UsingType. + if (const auto *S = dyn_cast<UsingType>(&Node)) { + return matchesSpecialized(S->desugar(), Finder, Builder); + } return false; } |