Description
clang-format
breaks content of raw string literals containing JSON.
C:\bug>clang-format --version
clang-format version 18.0.0 (https://github.com/llvm/llvm-project.git c8544d280a8ef1e41efc5c036e00dc671edbb93d)
C:\bug>type .clang-format
BasedOnStyle: LLVM
RawStringFormats:
- Language: Json
Delimiters: [json]
C:\bug>type test.cpp
void foo() {
const char *json = R"json({
"str": "test"
})json";
}
C:\bug>clang-format -style=file test.cpp
void foo() {
const char *json = R"json(tr": "test" })json";
}