llvm-project
a7cb007d - [Clang] [NFC] Add `FunctionDecl::getNumParamsIncludingThis()` (#230675)

Commit
45 days ago
[Clang] [NFC] Add `FunctionDecl::getNumParamsIncludingThis()` (#230675) There are currently a few places where we need to get the number of parameters a function has + the `this` parameter, but only if it's not an explicit object parameter (as that one is already included in the normal parameter count). This is a bit clunky to write, so this patch adds a helper you can call for that. Sema sometimes calls `getFunctionOrMethodNumParams()` instead, which handles more than just `FunctionDecl`s, so this updates that helper as well. Assisted-by: Codex
Author
Parents
Loading