================
@@ -2651,13 +2651,13 @@ void TextNodeDumper::VisitVarDecl(const VarDecl *D) {
 
   if (D->hasInit()) {
     const Expr *E = D->getInit();
-    // Only dump the value of constexpr VarDecls for now.
+    // Only evaluate the value of constexpr VarDecls.
     if (E && !E->isValueDependent() && D->isConstexpr() &&
-        !D->getType()->isDependentType()) {
-      const APValue *Value = D->evaluateValue();
-      if (Value)
-        AddChild("value", [=] { Visit(*Value, E->getType()); });
-    }
+        !D->getType()->isDependentType())
+      D->evaluateValue();
----------------
efriedma-quic wrote:

I don't think we want to force evaluation here at all.

https://github.com/llvm/llvm-project/pull/239672
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to