https://bugs.llvm.org/show_bug.cgi?id=49298
clang-format does not respect raw string literals when sorting includes
const char *RawStr = R"( #include "headerB.h" #include "headerA.h" )";
Running clang-format over with SortIncludes enabled transforms this code to:
const char *RawStr = R"( #include "headerA.h" #include "headerB.h" )";
The following code tries to minimize this impact during IncludeSorting, by treating R"( and )" as equivalent of // clang-format off/on
A raw string literal is:
So, you missed the digits and the characters: _{}[]#<>%:;.?*+-/^&|~!=,'.
Please add a test case.
Mind the need to escape the square brackets [] and the minus sign - in the regexp (the latter can be put at the beginning or at the end too).
Cf. https://en.cppreference.com/w/cpp/language/string_literal, https://godbolt.org/z/rb61WzMcs