From 8229f72b7b357ab9cd2b0a7a47356b16a47269ce Mon Sep 17 00:00:00 2001 From: google-yfyang Date: Thu, 29 May 2025 18:45:50 -0400 Subject: Add "maybe_unused" to variable only used in assert (#142049) --- clang/lib/AST/ByteCode/InterpBuiltin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/AST/ByteCode/InterpBuiltin.cpp') diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp index e84d8fb..3b47d86 100644 --- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp +++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp @@ -764,7 +764,8 @@ static bool interp__builtin_addressof(InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) { assert(Call->getArg(0)->isLValue()); - PrimType PtrT = S.getContext().classify(Call->getArg(0)).value_or(PT_Ptr); + [[maybe_unused]] PrimType PtrT = + S.getContext().classify(Call->getArg(0)).value_or(PT_Ptr); assert(PtrT == PT_Ptr && "Unsupported pointer type passed to __builtin_addressof()"); return true; -- cgit v1.1