Skip to content

Commit 8229f72

Browse files
Add "maybe_unused" to variable only used in assert (#142049)
1 parent 29d49de commit 8229f72

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,8 @@ static bool interp__builtin_addressof(InterpState &S, CodePtr OpPC,
764764
const InterpFrame *Frame,
765765
const CallExpr *Call) {
766766
assert(Call->getArg(0)->isLValue());
767-
PrimType PtrT = S.getContext().classify(Call->getArg(0)).value_or(PT_Ptr);
767+
[[maybe_unused]] PrimType PtrT =
768+
S.getContext().classify(Call->getArg(0)).value_or(PT_Ptr);
768769
assert(PtrT == PT_Ptr &&
769770
"Unsupported pointer type passed to __builtin_addressof()");
770771
return true;

0 commit comments

Comments
 (0)