llvm-project/clang/test/Lexer/cxx0x_raw_string_delim_length.cpp
Richard Smith 812924502b When checking the encoding of an 8-bit string literal, don't just check the
first codepoint! Also, don't reject empty raw string literals for spurious
"encoding" issues. Also, don't rely on undefined behavior in ConvertUTF.c.

llvm-svn: 152344
2012-03-08 21:59:28 +00:00

8 lines
376 B
C++

// RUN: %clang_cc1 -std=c++11 -verify %s
const char *str1 = R"(abcdef)"; // ok
const char *str2 = R"foo()foo"; // ok
const char *str3 = R"()"; // ok
// FIXME: recover better than this.
const char *str4 = R"abcdefghijkmnopqrstuvwxyz(abcdef)abcdefghijkmnopqrstuvwxyz"; // expected-error {{raw string delimiter longer than 16 characters}} expected-error {{expected expression}}