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

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 14 02:55:14 PDT 2026


================
@@ -1072,6 +1116,84 @@ getAPINotesParameterSelectorCandidates(const Sema &S, const FunctionDecl *FD) {
   return Candidates;
 }
 
+static APINotesParameterSelectorSet
+makeParameterSelectorSet(ArrayRef<SmallVector<std::string, 4>> Selectors) {
+  APINotesParameterSelectorSet Set;
+  for (const SmallVector<std::string, 4> &Selector : Selectors)
+    Set.add(Selector);
+  return Set;
+}
+
+static std::string
+formatParameterSelectorForDiagnostic(ArrayRef<std::string> Parameters) {
+  std::string Result = "[";
+  for (unsigned I = 0, E = Parameters.size(); I != E; ++I) {
----------------
Xazax-hun wrote:

Similar to `formatWhereParameters`, could this be deduplicated?

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


More information about the cfe-commits mailing list