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



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

Reply via email to