[clang-format] Simplify raw string regex. NFC.

Introduced in https://reviews.llvm.org/D115168.

Reviewed By: MyDeveloperDay, HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D116647
This commit is contained in:
Marek Kurdej 2022-01-05 13:39:08 +01:00
parent df4ad3625f
commit 46db030188
1 changed files with 2 additions and 1 deletions

View File

@ -2596,8 +2596,9 @@ tooling::Replacements sortCppIncludes(const FormatStyle &Style, StringRef Code,
bool MainIncludeFound = false;
bool FormattingOff = false;
// '[' must be the first and '-' the last character inside [...].
llvm::Regex RawStringRegex(
"R\"(([\\[A-Za-z0-9_{}#<>%:;.?*+/^&\\$|~!=,'\\-]|])*)\\(");
"R\"([][A-Za-z0-9_{}#<>%:;.?*+/^&\\$|~!=,'-]*)\\(");
SmallVector<StringRef, 2> RawStringMatches;
std::string RawStringTermination = ")\"";