[clang] f487c0e - [AST] Fix warnings
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 20 08:59:05 PDT 2025
Author: Kazu Hirata
Date: 2025-08-20T08:58:59-07:00
New Revision: f487c0e63cee9aba57335b1c509f7780de849f65
URL: https://github.com/llvm/llvm-project/commit/f487c0e63cee9aba57335b1c509f7780de849f65
DIFF: https://github.com/llvm/llvm-project/commit/f487c0e63cee9aba57335b1c509f7780de849f65.diff
LOG: [AST] Fix warnings
This patch fixes:
clang/lib/AST/ByteCode/InterpBuiltin.cpp:1827:21: error: unused
variable 'ASTCtx' [-Werror,-Wunused-variable]
clang/lib/AST/ByteCode/InterpBuiltin.cpp:2724:18: error: unused
variable 'Arg2Type' [-Werror,-Wunused-variable]
clang/lib/AST/ByteCode/InterpBuiltin.cpp:2725:18: error: unused
variable 'Arg3Type' [-Werror,-Wunused-variable]
clang/lib/AST/ByteCode/InterpBuiltin.cpp:2748:18: error: unused
variable 'ElemT' [-Werror,-Wunused-variable]
Added:
Modified:
clang/lib/AST/ByteCode/InterpBuiltin.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
index 5de5091178b8f..93661d8e2ddf8 100644
--- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp
+++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
@@ -1830,6 +1830,7 @@ static bool interp__builtin_elementwise_countzeroes(InterpState &S,
assert(Call->getArg(1)->getType()->isVectorType() &&
ASTCtx.hasSameUnqualifiedType(Call->getArg(0)->getType(),
Call->getArg(1)->getType()));
+ (void)ASTCtx;
ZeroArg = S.Stk.pop<Pointer>();
assert(ZeroArg.getFieldDesc()->isPrimitiveArray());
}
@@ -2728,6 +2729,8 @@ static bool interp__builtin_elementwise_fma(InterpState &S, CodePtr OpPC,
if (!Arg1Type->isVectorType()) {
assert(!Arg2Type->isVectorType());
assert(!Arg3Type->isVectorType());
+ (void)Arg2Type;
+ (void)Arg3Type;
const Floating &Z = S.Stk.pop<Floating>();
const Floating &Y = S.Stk.pop<Floating>();
@@ -2753,6 +2756,7 @@ static bool interp__builtin_elementwise_fma(InterpState &S, CodePtr OpPC,
assert(NumElems == Arg2Type->castAs<VectorType>()->getNumElements() &&
NumElems == Arg3Type->castAs<VectorType>()->getNumElements());
assert(ElemT->isRealFloatingType());
+ (void)ElemT;
const Pointer &VZ = S.Stk.pop<Pointer>();
const Pointer &VY = S.Stk.pop<Pointer>();
More information about the cfe-commits
mailing list