Skip to content

bad error message on incorrect string literal #18079

@llvmbot

Description

@llvmbot
Bugzilla Link 17705
Version 3.2
OS Linux
Reporter LLVM Bugzilla Contributor
CC @DougGregor

Extended Description

linefeed should not be printed inside quotes. Instead error should be something like "invalid newline character in raw string delimiter".

5.cpp:1:21: error: invalid character '
' character in raw string delimiter; use PREFIX( )PREFIX to delimit raw string
char const* a = R"";
                    ^
5.cpp:1:17: error: expected expression
char const* a = R"";
                ^
2 errors generated.

Metadata

Metadata

Labels

bugzillaIssues migrated from bugzillac++11clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerconfirmedVerified by a second partygood first issuehttps://github.com/llvm/llvm-project/contribute

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions