================
@@ -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) {
----------------
hokein wrote:

Yes, I think it is possible to do it (by reusing some of the functionalities 
from `diagnoseMissingImport`), but it will require some refactoring. I will 
leave it as a followup patch. Added a FIXME.

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