Skip to content

Commit 6d30e45

Browse files
committed
modify diagnostics information, use 'others including ...'
1 parent 923e57e commit 6d30e45

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ Improvements to Clang's diagnostics
405405
attributes are used with a negative size (#GH165463).
406406

407407
- A new warning ``-Wshadow-header`` has been added to detect when a header file
408-
is found in multiple search directories(excluding system paths).
408+
is found in multiple search directories (excluding system paths).
409409

410410
Improvements to Clang's time-trace
411411
----------------------------------

clang/include/clang/Basic/DiagnosticLexKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ def warn_framework_include_private_from_public : Warning<
961961
>, InGroup<FrameworkIncludePrivateFromPublic>;
962962
def warn_header_shadowing : Warning<
963963
"multiple candidates for header '%0' found; "
964-
"directory '%1' chosen, ignoring '%2' and others">,
964+
"directory '%1' chosen, ignoring others including '%2'">,
965965
InGroup<ShadowHeader>, DefaultIgnore;
966966
def warn_deprecated_module_dot_map : Warning<
967967
"'%0' as a module map name is deprecated, rename it to %select{module.modulemap|module.private.modulemap}1%select{| in the 'Modules' directory of the framework}2">,

clang/test/Preprocessor/header-shadowing.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
// RUN: %clang_cc1 -Wshadow-header -Eonly %t/main.c -I %t/include1 -I %t/include2 \
99
// RUN: -isystem %t/system1 -isystem %t/system2 2>&1 | FileCheck %s --check-prefix=SHADOWING
1010

11-
// SHADOWING: {{.*}} warning: multiple candidates for header 'header.h' found; directory '{{.*}}include1' chosen, ignoring '{{.*}}include2' and others [-Wshadow-header]
11+
// SHADOWING: {{.*}} warning: multiple candidates for header 'header.h' found; directory '{{.*}}include1' chosen, ignoring others including '{{.*}}include2' [-Wshadow-header]
1212
// SHADOWING: warning: include1/header.h included!
13-
// SHADOWING-NOT: {{.*}} warning: multiple candidates for header 'header.h' found; directory '{{.*}}include2' chosen, ignoring '{{.*}}include1' and others [-Wshadow-header]
13+
// SHADOWING-NOT: {{.*}} warning: multiple candidates for header 'header.h' found; directory '{{.*}}include2' chosen, ignoring others including '{{.*}}include1' [-Wshadow-header]
1414
// SHADOWING: warning: include2/header.h included!
15-
// SHADOWING-NOT: {{.*}} warning: multiple candidates for header 'stdio.h' found; directory '{{.*}}system1' chosen, ignoring '{{.*}}system2' and others [-Wshadow-header]
15+
// SHADOWING-NOT: {{.*}} warning: multiple candidates for header 'stdio.h' found; directory '{{.*}}system1' chosen, ignoring others including '{{.*}}system2' [-Wshadow-header]
1616
// SHADOWING: warning: system1/stdio.h included!
1717

1818
/// Check that the diagnostic is only performed once in MSVC compatibility mode.
1919
// RUN: %clang_cc1 -fms-compatibility -Wshadow-header -Eonly %t/t.c 2>&1 | FileCheck %s --check-prefix=SHADOWING-MS
2020

21-
// SHADOWING-MS: {{.*}} warning: multiple candidates for header 't3.h' found; directory '{{.*}}foo' chosen, ignoring '{{.*}}' and others [-Wshadow-header]
22-
// SHADOWING-MS-NOT: {{.*}} warning: multiple candidates for header 't3.h' found; directory '{{.*}}' chosen, ignoring '{{.*}}foo' and others [-Wshadow-header]
21+
// SHADOWING-MS: {{.*}} warning: multiple candidates for header 't3.h' found; directory '{{.*}}foo' chosen, ignoring others including '{{.*}}' [-Wshadow-header]
22+
// SHADOWING-MS-NOT: {{.*}} warning: multiple candidates for header 't3.h' found; directory '{{.*}}' chosen, ignoring others including '{{.*}}foo' [-Wshadow-header]
2323
// SHADOWING-MS: warning: Found foo/t3.h.
2424

2525
//--- main.c

0 commit comments

Comments
 (0)