From 9e2dc984ba1b25625e6ddc38ba681b194172379a Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 9 Dec 2022 10:42:43 +0100 Subject: [PATCH] [Clang] improve grammar in warn_utf8_symbol_homoglyph diagnostic --- clang/include/clang/Basic/DiagnosticLexKinds.td | 2 +- clang/test/Lexer/unicode.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticLexKinds.td b/clang/include/clang/Basic/DiagnosticLexKinds.td index 75a133d..a915f75 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>; def warn_utf8_symbol_homoglyph : Warning< - "treating Unicode character as identifier character rather than " + "treating Unicode character as an identifier character rather than " "as '%1' symbol">, InGroup>; def warn_utf8_symbol_zero_width : Warning< "identifier contains Unicode character that is invisible in " diff --git a/clang/test/Lexer/unicode.c b/clang/test/Lexer/unicode.c index 0aea76f..98a2e86 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 as identifier character rather than as ';' symbol}} -int *n꞉꞉v = &n;; // expected-warning 2{{treating Unicode character as identifier character rather than as ':' symbol}} - // expected-warning@-1 {{treating Unicode character as identifier character rather than as ';' symbol}} +int n; = 3; // expected-warning {{treating Unicode character as an identifier character rather than as ';' symbol}} +int *n꞉꞉v = &n;; // expected-warning 2{{treating Unicode character as an identifier character rather than as ':' symbol}} + // expected-warning@-1 {{treating Unicode character as an identifier character rather than as ';' symbol}} int v=[=](auto){return~x;}(); // expected-warning 12{{treating Unicode character}} int ⁠xx‍; -- 2.7.4