pestctrl added inline comments.
================ Comment at: clang/lib/AST/Decl.cpp:2192 DefinitionKind Kind = isThisDeclarationADefinition(); - if (Kind != TentativeDefinition) + if (Kind != TentativeDefinition || hasDefinition()) return nullptr; ---------------- rsmith wrote: > Is there a good reason to switch from checking for a `Definition` in the loop > to checking it ahead of time? This change means we'll do two passes over the > redeclarations, and call `isThisDeclarationADefinition` twice for each, where > the old approach only performed one pass. My thought was that separating the logic would make the loop easier to read, but I see that this causes 2 passes vs. 1. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99732/new/ https://reviews.llvm.org/D99732 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits