StoeckOverflow wrote: Thanks, I reworked this to avoid the repeated declaration-context scan.
Instead of walking `noload_decls()` each time a function declaration is processed, Sema now keeps diagnostic state separately for each `APINotesReader`. The reader enumerates stored exact `Where.Parameters` selectors once, `ProcessAPINotes` marks matching selector candidates as used while declarations are processed, and `ActOnEndOfTranslationUnit` emits warnings for selectors that were seen by function/method name but never matched by an exact parameter selector. I also changed the identifier reverse lookup to build a lazy ID-to-string cache from the identifier table’s `keys()` / `data()` iterators, so we avoid doing a lookup for each identifier while reconstructing the stored `Where.Parameters` strings used in diagnostics. The cache-building comment now documents that this is a one-time linear operation and depends on the iterators walking the same serialized entries in lockstep. https://github.com/llvm/llvm-project/pull/209408 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
