[clang][Sema][NFC] Make local variable const
authorTimm Bäder <tbaeder@redhat.com>
Thu, 23 Mar 2023 07:22:23 +0000 (08:22 +0100)
committerTimm Bäder <tbaeder@redhat.com>
Thu, 23 Mar 2023 07:23:00 +0000 (08:23 +0100)
clang/lib/Sema/SemaDeclAttr.cpp

index 229e73618c53cc8c7ee19f71e8894884f49a1e5a..efa275c0aa12b01401e4a9e7e1998cba756cefc5 100644 (file)
@@ -3759,7 +3759,7 @@ static void handleEnumExtensibilityAttr(Sema &S, Decl *D,
 /// Handle __attribute__((format_arg((idx)))) attribute based on
 /// http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
 static void handleFormatArgAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
-  Expr *IdxExpr = AL.getArgAsExpr(0);
+  const Expr *IdxExpr = AL.getArgAsExpr(0);
   ParamIdx Idx;
   if (!checkFunctionOrMethodParameterIndex(S, D, AL, 1, IdxExpr, Idx))
     return;