mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-14 17:06:38 +00:00
[clang-change-namespace] Avoid repeated hash lookups (NFC) (#111784)
This commit is contained in:
parent
77c842f44c
commit
d2a96d170a
@ -606,9 +606,8 @@ void ChangeNamespaceTool::run(
|
||||
Result.Nodes.getNodeAs<DeclRefExpr>("func_ref")) {
|
||||
// If this reference has been processed as a function call, we do not
|
||||
// process it again.
|
||||
if (ProcessedFuncRefs.count(FuncRef))
|
||||
if (!ProcessedFuncRefs.insert(FuncRef).second)
|
||||
return;
|
||||
ProcessedFuncRefs.insert(FuncRef);
|
||||
const auto *Func = Result.Nodes.getNodeAs<FunctionDecl>("func_decl");
|
||||
assert(Func);
|
||||
const auto *Context = Result.Nodes.getNodeAs<Decl>("dc");
|
||||
|
Loading…
x
Reference in New Issue
Block a user