[clang] f2cca0b - Silence unused variable warning in Release builds. NFCI.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 20 01:49:01 PDT 2020
Author: Benjamin Kramer
Date: 2020-10-20T10:48:48+02:00
New Revision: f2cca0b291491f25dc6d2c073d71a2799625ad3b
URL: https://github.com/llvm/llvm-project/commit/f2cca0b291491f25dc6d2c073d71a2799625ad3b
DIFF: https://github.com/llvm/llvm-project/commit/f2cca0b291491f25dc6d2c073d71a2799625ad3b.diff
LOG: Silence unused variable warning in Release builds. NFCI.
Added:
Modified:
clang/lib/AST/Decl.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 5084f867622f4..b3a67715d604b 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -2451,8 +2451,7 @@ bool VarDecl::checkForConstantInitialization(
"already evaluated var value before checking for constant init");
assert(getASTContext().getLangOpts().CPlusPlus && "only meaningful in C++");
- const auto *Init = cast<Expr>(Eval->Value);
- assert(!Init->isValueDependent());
+ assert(!cast<Expr>(Eval->Value)->isValueDependent());
// Evaluate the initializer to check whether it's a constant expression.
Eval->HasConstantInitialization =
More information about the cfe-commits
mailing list