[PATCH] D23492: Make function local tags visible.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 18 14:09:02 PDT 2016
rsmith added inline comments.
================
Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3598-3603
@@ -3599,1 +3597,8 @@
+ // FIXME: We need to track the instantiation stack in order to know which
+ // definitions should be visible within this instantiation.
+ if (DiagnoseUninstantiableTemplate(PointOfInstantiation, Function,
+ Function->getInstantiatedFromMemberFunction(),
+ PatternDecl, PatternDecl, TSK,
+ /*Complain*/DefinitionRequired))
+ return;
----------------
As long as we treat a late-parsed template as being defined, it should be fine (and looking at `FunctionDecl::isThisDeclarationADefinition`, we do). It's not correct to parse a late-parsed template that's not visible, so we need to move this check to before we handle late-parsed templates for correctness.
https://reviews.llvm.org/D23492
More information about the cfe-commits
mailing list