diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 5084f867622f..b3a67715d604 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(Eval->Value); - assert(!Init->isValueDependent()); + assert(!cast(Eval->Value)->isValueDependent()); // Evaluate the initializer to check whether it's a constant expression. Eval->HasConstantInitialization =