diff options
Diffstat (limited to 'clang/tools/clang-refactor/TestSupport.cpp')
-rw-r--r-- | clang/tools/clang-refactor/TestSupport.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/tools/clang-refactor/TestSupport.cpp b/clang/tools/clang-refactor/TestSupport.cpp index 9d2d9662276..cfe9c0c8427 100644 --- a/clang/tools/clang-refactor/TestSupport.cpp +++ b/clang/tools/clang-refactor/TestSupport.cpp @@ -303,9 +303,10 @@ findTestSelectionRanges(StringRef Filename) { // See the doc comment for this function for the explanation of this // syntax. - static Regex RangeRegex("range[[:blank:]]*([[:alpha:]_]*)?[[:blank:]]*=[[:" - "blank:]]*(\\+[[:digit:]]+)?[[:blank:]]*(->[[:blank:]" - "]*[\\+\\:[:digit:]]+)?"); + static const Regex RangeRegex( + "range[[:blank:]]*([[:alpha:]_]*)?[[:blank:]]*=[[:" + "blank:]]*(\\+[[:digit:]]+)?[[:blank:]]*(->[[:blank:]" + "]*[\\+\\:[:digit:]]+)?"); std::map<std::string, SmallVector<TestSelectionRange, 8>> GroupedRanges; @@ -352,7 +353,7 @@ findTestSelectionRanges(StringRef Filename) { unsigned EndOffset; if (!Matches[3].empty()) { - static Regex EndLocRegex( + static const Regex EndLocRegex( "->[[:blank:]]*(\\+[[:digit:]]+):([[:digit:]]+)"); SmallVector<StringRef, 4> EndLocMatches; if (!EndLocRegex.match(Matches[3], &EndLocMatches)) { |