================
@@ -5082,11 +5085,16 @@ void Sema::InstantiateFunctionDefinition(SourceLocation 
PointOfInstantiation,
       if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() &&
           !getSourceManager().isInSystemHeader(PatternDecl->getBeginLoc())) {
         Diag(PointOfInstantiation, diag::warn_func_template_missing)
-          << Function;
-        Diag(PatternDecl->getLocation(), diag::note_forward_template_decl);
-        if (getLangOpts().CPlusPlus11)
-          Diag(PointOfInstantiation, diag::note_inst_declaration_hint)
-              << Function;
+            << Function;
+        if (Unreachable) {
----------------
ilya-biryukov wrote:
It would probably also be useful to say which module it's coming from (similar 
to what we have if you try to use a declaration from a module that's available, 
but not imported; or when we have problems with ODR checks and we point to 
modules that the declarations are coming from)

But it's also an improvement as is, I'm not sure how hard it would be to add 
that.

https://github.com/llvm/llvm-project/pull/129031
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to