summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/UnwrappedLineParser.cpp
diff options
context:
space:
mode:
authorThomas Preud'homme <thomasp@graphcore.ai>2019-11-19 11:18:51 +0000
committerThomas Preud'homme <thomasp@graphcore.ai>2019-11-19 16:15:21 +0000
commitb81cc6032902c810e0fde485d3092a947dc38541 (patch)
tree13748acfffc7fee11d17cf47fb5e5878519f56a6 /clang/lib/Format/UnwrappedLineParser.cpp
parent62871305c28f3102d5d06da929379674f2d40d04 (diff)
downloadbcm5719-llvm-b81cc6032902c810e0fde485d3092a947dc38541.tar.gz
bcm5719-llvm-b81cc6032902c810e0fde485d3092a947dc38541.zip
[clang][NFC] Make various uses of Regex const
The const-correctness of match() was fixed in rL372764, which allows uses of Regex objects to be const in cases they couldn't be before. This patch tightens up the const-ness of Regex in various such cases. Reviewers: thopre Reviewed By: thopre Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68155
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index bbe05602f6d..1e27eab1e74 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/lib/Format/UnwrappedLineParser.cpp
@@ -2498,9 +2498,10 @@ bool UnwrappedLineParser::isOnNewLine(const FormatToken &FormatTok) {
// Checks if \p FormatTok is a line comment that continues the line comment
// section on \p Line.
-static bool continuesLineCommentSection(const FormatToken &FormatTok,
- const UnwrappedLine &Line,
- llvm::Regex &CommentPragmasRegex) {
+static bool
+continuesLineCommentSection(const FormatToken &FormatTok,
+ const UnwrappedLine &Line,
+ const llvm::Regex &CommentPragmasRegex) {
if (Line.Tokens.empty())
return false;
OpenPOWER on IntegriCloud