Skip to content

Commit 2a78358

Browse files
Enclose code that does nothing useful in nondebug in #ifndef NDEBUG/#endif in InterpBuiltin.cpp
1 parent 2112379 commit 2a78358

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,12 +763,13 @@ static bool interp__builtin_ffs(InterpState &S, CodePtr OpPC,
763763
static bool interp__builtin_addressof(InterpState &S, CodePtr OpPC,
764764
const InterpFrame *Frame,
765765
const CallExpr *Call) {
766+
#ifndef NDEBUG
766767
assert(Call->getArg(0)->isLValue());
767-
[[maybe_unused]] PrimType PtrT =
768+
PrimType PtrT =
768769
S.getContext().classify(Call->getArg(0)).value_or(PT_Ptr);
769770
assert(PtrT == PT_Ptr &&
770771
"Unsupported pointer type passed to __builtin_addressof()");
771-
(void)PtrT;
772+
#endif
772773
return true;
773774
}
774775

0 commit comments

Comments
 (0)