================
@@ -49,14 +49,15 @@ EvaluationResult EvalEmitter::interpretExpr(const Expr *E,
return std::move(this->EvalResult);
}
-EvaluationResult EvalEmitter::interpretDecl(const VarDecl *VD,
+EvaluationResult EvalEmitter::interpretDecl(const VarDecl *VD, const Expr
*Init,
bool CheckFullyInitialized) {
this->CheckFullyInitialized = CheckFullyInitialized;
S.EvaluatingDecl = VD;
S.setEvalLocation(VD->getLocation());
EvalResult.setSource(VD);
- if (const Expr *Init = VD->getAnyInitializer()) {
+ // FIXME: I think Init is never null.
+ if (Init) {
----------------
shafik wrote:
You could add an assert and if it crashes, then this is incorrect, it does not
prove it but it could show the negative and then you have a test case.
https://github.com/llvm/llvm-project/pull/158056
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits