================
@@ -9687,6 +9709,28 @@ void ASTReader::ReadWeakUndeclaredIdentifiers(
WeakUndeclaredIdentifiers.clear();
}
+void ASTReader::ReadExtnameUndeclaredIdentifiers(
+ SmallVectorImpl<std::pair<IdentifierInfo *, AsmLabelAttr *>> &ExtnameIDs) {
+ if (ExtnameUndeclaredIdentifiers.empty())
+ return;
+
+ for (unsigned I = 0, N = ExtnameUndeclaredIdentifiers.size(); I < N;
+ /*none*/) {
----------------
ilovepi wrote:
nit: As a reader of this code, I think I'd prefer `I+3` as the loop variable
update and then specific indexing in the body eg
`ExtnameUndeclaredIdentifiers[I+2]`. That's rather a style thing though, and
I'll admit I didn't check if this is a common pattern in this file. It does
also make me wonder if these lists should just be actual tuples you iterate
over if they're only ever consumed together (or even if you should have a
different type that maps the common ID to the 3 items). I've not thought about
this very much, and indeed I've seldom needed to deal with the AST Reader, but
its what came to mind as I read the patch.
https://github.com/llvm/llvm-project/pull/186755
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits