mirror of https://github.com/microsoft/clang.git
[ASTMatchers] Don't create a copy of a std::set when iterating over it.
This is a bit awkward because lookup returns a copy instead of a reference. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315276 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1c1f51cab8
commit
d89b5f87c9
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue