[clang] [APINotes] Diagnose invalid Where.Parameters selectors (PR #209408)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 28 05:31:13 PDT 2026
================
@@ -788,6 +793,21 @@ bool clang::api_notes::parseAndDumpAPINotes(StringRef YI,
namespace {
using namespace api_notes;
+static std::string
+getFunctionSelectorKey(llvm::StringRef Name,
+ llvm::ArrayRef<llvm::StringRef> Parameters) {
+ llvm::SmallString<64> Key;
+ llvm::raw_svector_ostream OS(Key);
+ auto AppendKeyPart = [&OS](llvm::StringRef Part) {
+ OS << Part.size() << ':' << Part;
+ };
+
+ AppendKeyPart(Name);
+ OS << ';';
+ llvm::interleave(Parameters, OS, AppendKeyPart, "");
----------------
Xazax-hun wrote:
We have nothing to interleave with here, so I guess this might be equivalent to a simpler:
```
for (StringRef P : Parameters)
AppendKeyPart(P);
```
https://github.com/llvm/llvm-project/pull/209408
More information about the cfe-commits
mailing list