[clang] [APINotes] Diagnose invalid Where.Parameters selectors (PR #209408)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 22 02:13:46 PDT 2026


================
@@ -1313,6 +1314,8 @@ class Sema final : public SemaBase {
   SourceManager &SourceMgr;
   api_notes::APINotesManager APINotes;
 
+  std::unique_ptr<APINotesSelectorDiagnosticState> APINotesSelectorDiagnostics;
----------------
StoeckOverflow wrote:

I think `APINotesManager` may not be the best owner for this state, because this is not persistent API-notes state. It is per-TU state about which selectors matched declarations during this `Sema` run, and it is consumed by `Sema`'s end-of-TU diagnostics.

Putting it in the manager would require the manager to participate in `Sema`'s declaration-processing and diagnostic lifecycle, instead of remaining a loading/lookup layer.

https://github.com/llvm/llvm-project/pull/209408


More information about the cfe-commits mailing list