[clang] 9e2dc98 - [Clang] improve grammar in warn_utf8_symbol_homoglyph diagnostic
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 9 01:52:20 PST 2022
Author: Corentin Jabot
Date: 2022-12-09T10:52:13+01:00
New Revision: 9e2dc984ba1b25625e6ddc38ba681b194172379a
URL: https://github.com/llvm/llvm-project/commit/9e2dc984ba1b25625e6ddc38ba681b194172379a
DIFF: https://github.com/llvm/llvm-project/commit/9e2dc984ba1b25625e6ddc38ba681b194172379a.diff
LOG: [Clang] improve grammar in warn_utf8_symbol_homoglyph diagnostic
Added:
Modified:
clang/include/clang/Basic/DiagnosticLexKinds.td
clang/test/Lexer/unicode.c
Removed:
################################################################################
diff --git a/clang/include/clang/Basic/DiagnosticLexKinds.td b/clang/include/clang/Basic/DiagnosticLexKinds.td
index 75a133d619d4d..a915f75a8ccb0 100644
--- a/clang/include/clang/Basic/DiagnosticLexKinds.td
+++ b/clang/include/clang/Basic/DiagnosticLexKinds.td
@@ -127,7 +127,7 @@ def ext_unicode_whitespace : ExtWarn<
"treating Unicode character as whitespace">,
InGroup<DiagGroup<"unicode-whitespace">>;
def warn_utf8_symbol_homoglyph : Warning<
- "treating Unicode character <U+%0> as identifier character rather than "
+ "treating Unicode character <U+%0> as an identifier character rather than "
"as '%1' symbol">, InGroup<DiagGroup<"unicode-homoglyph">>;
def warn_utf8_symbol_zero_width : Warning<
"identifier contains Unicode character <U+%0> that is invisible in "
diff --git a/clang/test/Lexer/unicode.c b/clang/test/Lexer/unicode.c
index 0aea76fb479cc..98a2e86aea55b 100644
--- a/clang/test/Lexer/unicode.c
+++ b/clang/test/Lexer/unicode.c
@@ -75,9 +75,9 @@ int main (void) {
return 🌷;
}
-int n; = 3; // expected-warning {{treating Unicode character <U+037E> as identifier character rather than as ';' symbol}}
-int *n꞉꞉v = &n;; // expected-warning 2{{treating Unicode character <U+A789> as identifier character rather than as ':' symbol}}
- // expected-warning at -1 {{treating Unicode character <U+037E> as identifier character rather than as ';' symbol}}
+int n; = 3; // expected-warning {{treating Unicode character <U+037E> as an identifier character rather than as ';' symbol}}
+int *n꞉꞉v = &n;; // expected-warning 2{{treating Unicode character <U+A789> as an identifier character rather than as ':' symbol}}
+ // expected-warning at -1 {{treating Unicode character <U+037E> as an identifier character rather than as ';' symbol}}
int v=[=](auto){return~x;}(); // expected-warning 12{{treating Unicode character}}
int xx;
More information about the cfe-commits
mailing list