summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Lexer/char-literal-encoding-fixit.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Lexer/char-literal-encoding-fixit.c b/clang/test/Lexer/char-literal-encoding-fixit.c
new file mode 100644
index 00000000000..ab5d28aa53f
--- /dev/null
+++ b/clang/test/Lexer/char-literal-encoding-fixit.c
@@ -0,0 +1,11 @@
+// RUN: cp %s %t
+// RUN: %clang_cc1 -fixit -x c %t
+// RUN: FileCheck -input-file=%t %t
+
+// Note that this file is not valid UTF-8.
+
+int test1 = 'ˆ';
+// CHECK: int test1 = '\x88';
+
+int test2 = 'abˆc';
+// CHECK: int test2 = 'ab\x88c';
OpenPOWER on IntegriCloud