================
@@ -5654,6 +5654,8 @@ def warn_func_template_missing : Warning<"instantiation 
of function %q0 "
   InGroup<UndefinedFuncTemplate>, DefaultIgnore;
 def note_forward_template_decl : Note<
   "forward declaration of template entity is here">;
+def note_unreachable_template_decl
+    : Note<"unreachable declaration of template entity is here">;
----------------
hokein wrote:

> should we expect Clang to sometimes complain about reachability in C++17 and 
> below with -fmodules enabled?

I think yes. Clang already does this — in` 
Sema::DiagnoseUninstantiableTemplate`, when a reachable function definition is 
missing, Clang may emit a "missing-import" diagnostic.

However, for this particular testcase, the issue is only triggered with the 
C++20 standard module feature

> But it looks like the method to judge unreachable decl in this patch is the 
> same for C++20 modules.

Yes, this aligns with my reading of the code. The same code is shared between 
header modules and C++20 modules.



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