diff options
| author | Jordan Rose <jordan_rose@apple.com> | 2013-06-07 17:16:01 +0000 |
|---|---|---|
| committer | Jordan Rose <jordan_rose@apple.com> | 2013-06-07 17:16:01 +0000 |
| commit | e2fad6d754fb97b6a1d531148392fd7e9a5e90a1 (patch) | |
| tree | f938b2ed1832e5cec3fcfc9fdcc7ac2409129c2c /clang/test/FixIt/fixit-unicode.c | |
| parent | 6d0004cd78606091c2e6c7f45373e0adc3b86379 (diff) | |
| download | bcm5719-llvm-e2fad6d754fb97b6a1d531148392fd7e9a5e90a1.tar.gz bcm5719-llvm-e2fad6d754fb97b6a1d531148392fd7e9a5e90a1.zip | |
Handle Unicode characters in fix-it replacement strings.
Patch by Sukolsak Sakshuwong!
llvm-svn: 183535
Diffstat (limited to 'clang/test/FixIt/fixit-unicode.c')
| -rw-r--r-- | clang/test/FixIt/fixit-unicode.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/FixIt/fixit-unicode.c b/clang/test/FixIt/fixit-unicode.c index 9c0242e92e3..216b73dbfce 100644 --- a/clang/test/FixIt/fixit-unicode.c +++ b/clang/test/FixIt/fixit-unicode.c @@ -34,3 +34,23 @@ void test2() { // CHECK-MACHINE: fix-it:"{{.*}}fixit-unicode.c":{[[@LINE-9]]:16-[[@LINE-9]]:18}:"%ld" } + +void test3() { + int กssss = 42; + int a = กsss; // expected-error{{use of undeclared identifier 'กsss'; did you mean 'กssss'?}} +// CHECK: {{^ \^}} +// CHECK: {{^ [^ ]+ssss}} +// CHECK-MACHINE: fix-it:"{{.*}}":{[[@LINE-3]]:11-[[@LINE-3]]:17}:"\340\270\201ssss" + + int ssกss = 42; + int b = ssกs; // expected-error{{use of undeclared identifier 'ssกs'; did you mean 'ssกss'?}} +// CHECK: {{^ \^}} +// CHECK: {{^ ss.+ss}} +// CHECK-MACHINE: fix-it:"{{.*}}":{[[@LINE-3]]:11-[[@LINE-3]]:17}:"ss\340\270\201ss" + + int sssssssssก = 42; + int c = sssssssss; // expected-error{{use of undeclared identifier 'sssssssss'; did you mean 'sssssssssก'?}} +// CHECK: {{^ \^}} +// CHECK: {{^ sssssssss.+}} +// CHECK-MACHINE: fix-it:"{{.*}}":{[[@LINE-3]]:11-[[@LINE-3]]:20}:"sssssssss\340\270\201" +} |

