[PATCH] D23492: Make function local tags visible.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 17 14:21:16 PDT 2016
rsmith added inline comments.
================
Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3608-3609
@@ -3600,1 +3607,4 @@
+
+ // TODO: Check if we could sink these diagnostics in
+ // DiagnoseUninstantiableTemplate.
if (!Pattern && !PatternDecl->isDefaulted()) {
----------------
If you can do that, it would be preferable. You'll presumably need to change the `PatternDecl` argument to `PatternDecl->isThisDeclarationADefinition() || PatternDecl->isDefaulted() ? PatternDecl : nullptr` or similar.
================
Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3670-3673
@@ -3662,1 +3669,6 @@
+ // Q: Shall we add this here for consistency with InstantiateClass and InstantiateEnum.
+ // The instantiation is visible here, even if it was first declared in an
+ // unimported module.
+ //Function->setHidden(false);
+
----------------
Yes, let's do this. It's not quite right, but the same is true for the `InstantiateClass` and `InstantiateEnum` cases, and it makes sense to handle all those cases the same way.
https://reviews.llvm.org/D23492
More information about the cfe-commits
mailing list