Files
clang-p2996/clang/test/Lexer/raw-string-dlim-invalid.cpp
akshaykumars614 cc23574184 bad error message on incorrect string literal #18079 (#81670)
(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>
2024-02-15 20:07:54 -05:00

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"";