cppfront icon indicating copy to clipboard operation
cppfront copied to clipboard

[BUG] Raw string with `{}` doesn't parse

Open JohelEGP opened this issue 2 years ago • 0 comments
trafficstars

Title: Raw string with {} doesn't parse.

Minimal reproducer (https://cpp2.godbolt.org/z/aPbMedenM):

main: () = {
  _ = R"({
  })";
}
Commands:
cppfront main.cpp2
clang++18 -std=c++23 -stdlib=libc++ -lc++abi -pedantic-errors -Wall -Wextra -Wconversion -Werror=unused-result -I . main.cpp

Expected result: A well-formed string literal.

Actual result and error:

main.cpp2...
main.cpp2(4,0): error: closing } does not match a prior {
main.cpp2: error: unexpected end of source file

JohelEGP avatar Nov 18 '23 00:11 JohelEGP