rsmith added inline comments.
================ Comment at: clang/lib/AST/ExprConstant.cpp:10166-10182 + EvalInfo Info(Ctx, Result, EvalInfo::EM_ConstantFold); + Info.IsNonTypeTemplateArgument = true; + LValue LV; + if (!EvaluateLValue(this, LV, Info) || Result.HasSideEffects || + !CheckLValueConstantExpression( + Info, getExprLoc(), Ctx.getLValueReferenceType(getType()), LV)) + return false; ---------------- Neither `EM_ConstantFold` nor `EM_IgnoreSideEffects` seem like the right evaluation modes to be using to evaluate a non-type template argument. I would expect `EM_ConstantExpression` to be used for both cases. https://reviews.llvm.org/D43320 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits