[clang] [APINotes] Match function-like Where.Parameters in Sema (PR #205307)
John Hui via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 2 17:59:43 PDT 2026
================
@@ -1024,10 +1105,21 @@ void Sema::ProcessAPINotes(Decl *D) {
// Global functions.
if (auto FD = dyn_cast<FunctionDecl>(D)) {
if (FD->getDeclName().isIdentifier()) {
+ std::optional<SmallVector<SmallVector<std::string, 4>, 2>>
+ ParameterSelectorCandidates =
+ getAPINotesParameterSelectorCandidates(*this, FD);
----------------
j-hui wrote:
nit: this is a good place to use `auto`:
```suggestion
auto ParameterSelectorCandidates =
getAPINotesParameterSelectorCandidates(*this, FD);
```
This way you can tweak the `SmallVector` inline size at the function declaration without having to refactor all call sites.
https://github.com/llvm/llvm-project/pull/205307
More information about the cfe-commits
mailing list