[all-commits] [llvm/llvm-project] cc2357: bad error message on incorrect string literal #180...

akshaykumars614 via All-commits all-commits at lists.llvm.org
Thu Feb 15 17:08:06 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cc23574184335df187275ca0e716bf79b93b75f1
      https://github.com/llvm/llvm-project/commit/cc23574184335df187275ca0e716bf79b93b75f1
  Author: akshaykumars614 <88362922+akshaykumars614 at users.noreply.github.com>
  Date:   2024-02-15 (Thu, 15 Feb 2024)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticLexKinds.td
    M clang/lib/Lex/Lexer.cpp
    A clang/test/Lexer/raw-string-dlim-invalid.cpp

  Log Message:
  -----------
  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 at gmail.com>




More information about the All-commits mailing list