[PATCH] D116647: [clang-format] Simplify raw string regex. NFC.
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 5 04:39:44 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG46db030188e5: [clang-format] Simplify raw string regex. NFC. (authored by curdeius).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116647/new/
https://reviews.llvm.org/D116647
Files:
clang/lib/Format/Format.cpp
Index: clang/lib/Format/Format.cpp
===================================================================
--- clang/lib/Format/Format.cpp
+++ clang/lib/Format/Format.cpp
@@ -2596,8 +2596,9 @@
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 = ")\"";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116647.397527.patch
Type: text/x-patch
Size: 577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220105/f23bff7a/attachment.bin>
More information about the cfe-commits
mailing list