llvm-project/clang/test/Misc/wrong-encoding.c

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
965 B
C
Raw Normal View History

// RUN: %clang_cc1 -fsyntax-only -Wno-unused-value %s 2>&1 | FileCheck -strict-whitespace %s
// REQUIRES: asserts
void foo() {
"<EFBFBD><EFBFBD>"; // <20>
// CHECK: {{^ "<A7><C3>"; // <F8>}}
// CHECK: {{^ \^~~~~~~}}
/* <20><> */ const char *d = "<EFBFBD>";
// CHECK: {{^ /\* <FE><AB> \*/ const char \*d = "<A5>";}}
// CHECK: {{^ \^~~~}}
"xx鿿<EFBFBD>d";
// CHECK: {{^ "xx<U\+9FFF><BF>d";}}
// CHECK: {{^ \^~~~}}
"xx<EFBFBD><EFBFBD>bcd";
// CHECK: {{^ "xx<E9><BF>bcd";}}
// CHECK: {{^ \^~~~~~~~}}
"xx<EFBFBD>abcd";
// CHECK: {{^ "xx<E9>abcd";}}
// CHECK: {{^ \^~~~}}
"xx<EFBFBD><EFBFBD><EFBFBD><EFBFBD>d";
// CHECK: {{^ "xx<E9><BF><E9><BF>d";}}
// CHECK: {{^ \^~~~~~~~~~~~~~~}}
"xx<EFBFBD><EFBFBD>xxxxxxxxxxxxxxxxxxxxx<EFBFBD><EFBFBD>xx";
// CHECK: {{^ "xx<E9><BF>xxxxxxxxxxxxxxxxxxxxx<E9><BF>xx";}}
// CHECK: {{^ \^~~~~~~~ ~~~~~~~~}}
2012-10-31 09:03:35 +08:00
"<EFBFBD>?k<><12>S<EFBFBD><53><EFBFBD>g<EFBFBD>7<EFBFBD>, 2,D<0E>u<EFBFBD><75>*<2A>,p<><70><EFBFBD>&<26><>(<28>K<EFBFBD>:<3A>'1<31><7F><EFBFBD>jOŰ<:";
"x<EFBFBD><EFBFBD>x<EFBFBD><EFBFBD>x<EFBFBD><EFBFBD>x<EFBFBD><EFBFBD>x<EFBFBD><EFBFBD>x<EFBFBD><EFBFBD>x<EFBFBD><EFBFBD>x<EFBFBD><EFBFBD>x<EFBFBD><EFBFBD>x<EFBFBD><EFBFBD>x<EFBFBD><EFBFBD>x<EFBFBD><EFBFBD>x";
}
// CHECK-NOT:Assertion