================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to