(bad error message on incorrect string literal)
Fixed the error message for incorrect string literal
before:
```
test.cpp:1:19: error: invalid character '
' character in raw string delimiter; use PREFIX( )PREFIX to delimit raw string
char const* a = R"
^
```
now:
```
test.cpp:1:19: error: invalid newline character in raw string delimiter; use PREFIX( )PREFIX to delimit raw string
1 | char const* a = R"
| ^
```
---------
Co-authored-by: Jon Roelofs <jroelofs@gmail.com>
10 lines
416 B
C++
10 lines
416 B
C++
// RUN: %clang_cc1 -E -fsyntax-only -verify %s
|
|
|
|
// expected-error@+2{{invalid character ')' in raw string delimiter; use PREFIX( )PREFIX to delimit raw string}}
|
|
// expected-error@+1{{expected expression}}
|
|
char const *str1 = R")";
|
|
|
|
// expected-error@+2{{invalid newline character in raw string delimiter; use PREFIX( )PREFIX to delimit raw string}}
|
|
// expected-error@+1{{expected expression}}
|
|
char const* str2 = R"";
|