diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2013-08-21 04:10:58 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2013-08-21 04:10:58 +0000 |
| commit | 3151d7c76a641b61347b667d1e6f757b6007f548 (patch) | |
| tree | 9d656bcbc02a782b81d2fe5e57119d089d7fc621 /clang/test | |
| parent | cee61339305cc00900ea7346656032447a756281 (diff) | |
| download | bcm5719-llvm-3151d7c76a641b61347b667d1e6f757b6007f548.tar.gz bcm5719-llvm-3151d7c76a641b61347b667d1e6f757b6007f548.zip | |
Issue fixits replacing invalid character literals with the equivalent \xNN
escape code.
llvm-svn: 188863
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Lexer/char-literal-encoding-fixit.c | 11 |
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'; |

