Skip to content

Commit 71c8699

Browse files
committed
Address review comments
1 parent 63ba6c9 commit 71c8699

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5689,7 +5689,7 @@ def warn_func_template_missing : Warning<"instantiation of function %q0 "
56895689
def note_forward_template_decl : Note<
56905690
"forward declaration of template entity is here">;
56915691
def note_unreachable_template_decl
5692-
: Note<"declaration of template entity is unreachable here">;
5692+
: Note<"unreachable declaration of template entity is here">;
56935693
def note_inst_declaration_hint : Note<"add an explicit instantiation "
56945694
"declaration to suppress this warning if %q0 is explicitly instantiated in "
56955695
"another translation unit">;

clang/lib/Sema/SemaTemplateInstantiateDecl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5421,6 +5421,8 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
54215421
Diag(PointOfInstantiation, diag::warn_func_template_missing)
54225422
<< Function;
54235423
if (Unreachable) {
5424+
// FIXME: would be nice to mention which module the function template
5425+
// comes from.
54245426
Diag(PatternDecl->getLocation(),
54255427
diag::note_unreachable_template_decl);
54265428
} else {

clang/test/Modules/diag-undefined-template.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t
22
// RUN: %clang_cc1 -std=c++20 -fmodules -fmodules-cache-path=%t -I%S/Inputs/undefined-template \
33
// RUN: -Wundefined-func-template \
4-
// RUN: -fimplicit-module-maps %s 2>&1 | grep "declaration of template entity is unreachable here"
4+
// RUN: -fimplicit-module-maps %s 2>&1 | grep "unreachable declaration of template entity is her"
55

66
#include "hoge.h"
77

0 commit comments

Comments
 (0)