rsmith added inline comments.

================
Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3899-3901
@@ -3898,5 +3898,5 @@
     // Instantiate the initializer.
     ExprResult Init =
         SubstInitializer(OldVar->getInit(), TemplateArgs,
-                         OldVar->getInitStyle() == VarDecl::CallInit);
+                         OldVar->getInitStyle() == VarDecl::CallInit, Var);
     if (!Init.isInvalid()) {
----------------
Instead of the other changes, switch `CurContext` to the context of the 
variable template here:

    Sema::ContextRAII SwitchContext(*this, Var->getDeclContext());


http://reviews.llvm.org/D19175



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

Reply via email to