[clang] 611d5ae - [clang] Fix -Wunused-variable in InterpBuiltin.cpp (NFC)
Jie Fu via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 14 06:56:21 PDT 2024
Author: Jie Fu
Date: 2024-03-14T21:55:23+08:00
New Revision: 611d5aec1de59fe567162158347c6c2ea29ff4d8
URL: https://github.com/llvm/llvm-project/commit/611d5aec1de59fe567162158347c6c2ea29ff4d8
DIFF: https://github.com/llvm/llvm-project/commit/611d5aec1de59fe567162158347c6c2ea29ff4d8.diff
LOG: [clang] Fix -Wunused-variable in InterpBuiltin.cpp (NFC)
llvm-project/clang/lib/AST/Interp/InterpBuiltin.cpp:1332:21:
error: unused variable 'SrcDesc' [-Werror,-Wunused-variable]
const Descriptor *SrcDesc = Src.getFieldDesc();
^
1 error generated.
Added:
Modified:
clang/lib/AST/Interp/InterpBuiltin.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/Interp/InterpBuiltin.cpp b/clang/lib/AST/Interp/InterpBuiltin.cpp
index 8113254f8fa8e2..8bbe881bb4b928 100644
--- a/clang/lib/AST/Interp/InterpBuiltin.cpp
+++ b/clang/lib/AST/Interp/InterpBuiltin.cpp
@@ -1329,7 +1329,7 @@ bool SetThreeWayComparisonField(InterpState &S, CodePtr OpPC,
bool DoMemcpy(InterpState &S, CodePtr OpPC, const Pointer &Src, Pointer &Dest) {
assert(Src.isLive() && Dest.isLive());
- const Descriptor *SrcDesc = Src.getFieldDesc();
+ [[maybe_unused]] const Descriptor *SrcDesc = Src.getFieldDesc();
const Descriptor *DestDesc = Dest.getFieldDesc();
assert(!DestDesc->isPrimitive() && !SrcDesc->isPrimitive());
More information about the cfe-commits
mailing list