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

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 16 03:25:07 PDT 2026


================
@@ -1143,6 +1251,18 @@ void Sema::ProcessAPINotes(Decl *D) {
                   return Reader->lookupGlobalFunction(FD->getName(), Parameters,
                                                       APINotesContext);
                 });
+
+          if (DiagnoseUnmatchedSelectors && !DeclarationSelectors.empty()) {
+            SmallVector<SmallVector<std::string, 4>, 4> RawAPINotesSelectors;
----------------
Xazax-hun wrote:

Would it make sense to construct an `APINotesParameterSelectorSet` here, instead of converting this to one later? And updating the APIs to work with that type. Only if this makes things simpler. 

I feel like we have too many data types representing the same concept, it would be nice to simplify as much as possible.

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


More information about the cfe-commits mailing list