[PATCH] D23492: Make function local tags visible.

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 18 04:36:40 PDT 2016


v.g.vassilev added inline comments.

================
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;
 
----------------
rsmith wrote:
> 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.
If I am to sink the diags under the // TODO: this might change behavior. The diagnostics may not kick-in properly in case of late template parsing (see around line 3594).


https://reviews.llvm.org/D23492





More information about the cfe-commits mailing list