[clang] 24c6409 - [clang] Fix -Wunused-variable in ByteCodeStmtGen.cpp (NFC)
Jie Fu via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 26 02:54:36 PDT 2024
Author: Jie Fu
Date: 2024-04-26T17:53:31+08:00
New Revision: 24c6409d56e43a7af3f6be6dd3e7267e243fb162
URL: https://github.com/llvm/llvm-project/commit/24c6409d56e43a7af3f6be6dd3e7267e243fb162
DIFF: https://github.com/llvm/llvm-project/commit/24c6409d56e43a7af3f6be6dd3e7267e243fb162.diff
LOG: [clang] Fix -Wunused-variable in ByteCodeStmtGen.cpp (NFC)
llvm-project/clang/lib/AST/Interp/ByteCodeStmtGen.cpp:196:31:
error: unused variable 'B' [-Werror,-Wunused-variable]
const Record::Base *B = R->getVirtualBase(BaseDecl);
^
1 error generated.
Added:
Modified:
clang/lib/AST/Interp/ByteCodeStmtGen.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/Interp/ByteCodeStmtGen.cpp b/clang/lib/AST/Interp/ByteCodeStmtGen.cpp
index 9b8e64f1138559..ec2fe39a8aeae9 100644
--- a/clang/lib/AST/Interp/ByteCodeStmtGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeStmtGen.cpp
@@ -193,8 +193,7 @@ bool ByteCodeStmtGen<Emitter>::visitFunc(const FunctionDecl *F) {
assert(BaseDecl);
if (Init->isBaseVirtual()) {
- const Record::Base *B = R->getVirtualBase(BaseDecl);
- assert(B);
+ assert(R->getVirtualBase(BaseDecl));
if (!this->emitGetPtrThisVirtBase(BaseDecl, InitExpr))
return false;
More information about the cfe-commits
mailing list