faisalv added a comment.

Address Richard's comments.


================
Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:190
@@ -189,3 +189,3 @@
   if (A->getCond()->isValueDependent() && !Cond->isValueDependent() &&
-      !Expr::isPotentialConstantExprUnevaluated(Cond, cast<FunctionDecl>(Tmpl),
+      !Expr::isPotentialConstantExprUnevaluated(Cond, cast<FunctionDecl>(New),
                                                 Diags)) {
----------------
rsmith wrote:
> Do we have existing test coverage for this (tests that fail with the 
> ExprConstant change if we don't fix this at the same time)?
Yes we do.  That's how I realized it needed to be fixed - it's enable_if.cpp in 
SemaCXX that has the following test:
template <typename T> T templatedBar(T m) attribute((enable_if(m > 0, ""))) { 
return T(); }



https://reviews.llvm.org/D23493



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to