rsmith added inline comments. ================ Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3597-3599 @@ -3595,4 +3596,5 @@ // FIXME: Check that the definition is visible before trying to instantiate // it. This requires us to track the instantiation stack in order to know // which definitions should be visible. + if (DiagnoseUninstantiableTemplate(PointOfInstantiation, Function, ---------------- Please update this FIXME to just "We need to track the instantiation stack in order to know which definitions should be visible within this instantiation."
================ Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3600-3605 @@ -3598,2 +3599,8 @@ // which definitions should be visible. + if (DiagnoseUninstantiableTemplate(PointOfInstantiation, Function, + Function->getInstantiatedFromMemberFunction(), + PatternDecl, + const_cast<FunctionDecl*>(PatternDecl), + TSK, /*Complain*/DefinitionRequired)) + return; ---------------- I think this should be checked before we deal with late-parsed templates -- if the template definition isn't visible, an attempt to instantiate it shouldn't trigger it being parsed. https://reviews.llvm.org/D23492 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits