[PATCH] D106435: Fix tests
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 21 06:43:52 PDT 2021
cor3ntin created this revision.
cor3ntin requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D106435
Files:
clang/test/Lexer/char-escapes-delimited.c
Index: clang/test/Lexer/char-escapes-delimited.c
===================================================================
--- clang/test/Lexer/char-escapes-delimited.c
+++ clang/test/Lexer/char-escapes-delimited.c
@@ -36,7 +36,7 @@
char b = '\x{abcdegggggabc}'; // expected-error 5{{invalid digit 'g' in escape sequence}}
char c = '\x{ff1}'; // expected-error {{hex escape sequence out of range}}
-#if WCHAR_MAX == 0xFFFFFFFF
+#if __WCHAR_MAX__ > 0xFFFF
unsigned d = L'\x{FFFFFFFF}'; // expected-warning {{extension}}
unsigned e = L'\x{100000000}'; // expected-error {{hex escape sequence out of range}}
#else
@@ -51,7 +51,7 @@
char a = '\o{1}'; // expected-warning {{extension}}
char b = '\o{12345678881238}'; // expected-error 4{{invalid digit '8' in escape sequence}}
char c = '\o{777}'; // //expected-error {{octal escape sequence out of range}}
-#if WCHAR_MAX == 0xFFFFFFFF
+#if __WCHAR_MAX__ > 0xFFFF
unsigned d = L'\o{37777777777}'; // expected-warning {{extension}}
unsigned e = L'\o{40000000000}'; // expected-error {{octal escape sequence out of range}}
#else
@@ -61,12 +61,9 @@
}
void concat() {
- (void)"\x{"
- "12}"; // expected-error {{expected '}'}}
- (void)"\u{"
- "12}"; // expected-error {{expected '}'}}
- (void)"\o{"
- "12}"; // expected-error {{expected '}'}}
+ (void)"\x{" "12}"; // expected-error {{expected '}'}}
+ (void)"\u{" "12}"; // expected-error {{expected '}'}}
+ (void)"\o{" "12}"; // expected-error {{expected '}'}}
(void)"\x{12" "}"; // expected-error {{expected '}'}}
(void)"\u{12" "}"; // expected-error {{expected '}'}}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106435.360427.patch
Type: text/x-patch
Size: 1657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210721/392cda0e/attachment.bin>
More information about the cfe-commits
mailing list