[clang] [Clang][NFC] Rename SecondArgIsLastNamedArgument for clarity and consistency (PR #131346)
Imad Aldij via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 15 12:46:12 PDT 2025
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/131346
>From 0b0361fe5f9c15a2682a642584dc6901053ae1cd Mon Sep 17 00:00:00 2001
From: Imad Aldij <os at imadij.com>
Date: Sat, 15 Mar 2025 21:43:06 +0200
Subject: [PATCH] [Clang] Rename SecondArgIsLastNamedArgument for clarity and
consistency
---
clang/lib/Sema/SemaChecking.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 500e7be84f9fa..c6feb35efce85 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -4898,15 +4898,15 @@ bool Sema::BuiltinVAStart(unsigned BuiltinID, CallExpr *TheCall) {
return false;
}
- // These are valid if SecondArgIsLastNamedArgument is false after the next
- // block.
+ // These are valid if SecondArgIsLastNonVariadicArgument is false after the
+ // next block.
QualType Type;
SourceLocation ParamLoc;
bool IsCRegister = false;
- bool SecondArgIsLastNamedArgument = false;
+ bool SecondArgIsLastNonVariadicArgument = false;
if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(Arg)) {
if (const ParmVarDecl *PV = dyn_cast<ParmVarDecl>(DR->getDecl())) {
- SecondArgIsLastNamedArgument = PV == LastParam;
+ SecondArgIsLastNonVariadicArgument = PV == LastParam;
Type = PV->getType();
ParamLoc = PV->getLocation();
@@ -4915,7 +4915,7 @@ bool Sema::BuiltinVAStart(unsigned BuiltinID, CallExpr *TheCall) {
}
}
- if (!SecondArgIsLastNamedArgument)
+ if (!SecondArgIsLastNonVariadicArgument)
Diag(TheCall->getArg(1)->getBeginLoc(),
diag::warn_second_arg_of_va_start_not_last_non_variadic_param);
else if (IsCRegister || Type->isReferenceType() ||
More information about the cfe-commits
mailing list