aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/InterpBuiltin.cpp
diff options
context:
space:
mode:
authorgoogle-yfyang <yfyang@google.com>2025-05-29 18:45:50 -0400
committerGitHub <noreply@github.com>2025-05-29 18:45:50 -0400
commit8229f72b7b357ab9cd2b0a7a47356b16a47269ce (patch)
tree5354d86ec9694469b11c9635cd584876566f874c /clang/lib/AST/ByteCode/InterpBuiltin.cpp
parent29d49de58a17309bc1a8f64d7962cf265e785702 (diff)
downloadllvm-8229f72b7b357ab9cd2b0a7a47356b16a47269ce.zip
llvm-8229f72b7b357ab9cd2b0a7a47356b16a47269ce.tar.gz
llvm-8229f72b7b357ab9cd2b0a7a47356b16a47269ce.tar.bz2
Add "maybe_unused" to variable only used in assert (#142049)
Diffstat (limited to 'clang/lib/AST/ByteCode/InterpBuiltin.cpp')
-rw-r--r--clang/lib/AST/ByteCode/InterpBuiltin.cpp3
1 files changed, 2 insertions, 1 deletions
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;