EricWF marked an inline comment as done. ================ Comment at: lib/AST/Expr.cpp:2653-2662 @@ -2651,4 +2652,12 @@ } - + if (CE->getConstructor()->isConstexpr() && + (CE->getConstructor()->getParent()->hasTrivialDestructor() || + AllowNonLiteral)) { + for (auto *Arg : CE->arguments()) { + if (!Arg->isConstantInitializer(Ctx, false, Culprit)) + return false; + } + return true; + } break; } ---------------- rsmith wrote: > This doesn't look right: just because we're calling a constexpr constructor > with constant arguments doesn't imply that the initializer is constant. I changed this to use `VD->checkInitICE()` when evaluating a constexpr constructor or if `VD->isInitKnownICE()`. Otherwise it falls back on `isConstantInitializer()`
https://reviews.llvm.org/D23385 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits