[clang] [APINotes] Match function-like Where.Parameters in Sema (PR #205307)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 6 03:27:08 PDT 2026
================
@@ -993,6 +993,119 @@ UnwindTagContext(TagDecl *DC, api_notes::APINotesManager &APINotes) {
return std::nullopt;
}
+static void stripAPINotesParameterNullability(QualType &ParamType) {
+ while (true) {
+ if (!AttributedType::stripOuterNullability(ParamType))
+ return;
+ }
+}
+
+struct APINotesParameterSelector {
+ SmallVector<std::string, 4> Parameters;
+
+ SmallVector<StringRef, 4> getParameterRefs() const {
----------------
Xazax-hun wrote:
Not necessarily for this PR, but I am wondering if we can avoid materializing yet another data structure at some point. Two ways I can think of:
* Create an iterator and begin/end, which lazily creates a `StringRef` during iteration and pass ranges of StringRefs around.
* Keep the `std::string` representation and instead of passing around `SmallVector<StringRef>`, we could pass `ArrayRef<std::string>`s.
https://github.com/llvm/llvm-project/pull/205307
More information about the cfe-commits
mailing list