[PATCH] D68091: [sancov][NFC] Make filename Regexes "const"

Nicolas Guillemot via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 10:35:44 PDT 2019


nlguillemot created this revision.
nlguillemot added a reviewer: thopre.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The const-correctness of match() was fixed in rL372764 <https://reviews.llvm.org/rL372764>, which allows
such static Regex objects to be marked const.


Repository:
  rL LLVM

https://reviews.llvm.org/D68091

Files:
  tools/sancov/sancov.cpp


Index: tools/sancov/sancov.cpp
===================================================================
--- tools/sancov/sancov.cpp
+++ tools/sancov/sancov.cpp
@@ -123,8 +123,8 @@
 static const uint32_t Bitness32 = 0xFFFFFF32;
 static const uint32_t Bitness64 = 0xFFFFFF64;
 
-static Regex SancovFileRegex("(.*)\\.[0-9]+\\.sancov");
-static Regex SymcovFileRegex(".*\\.symcov");
+static const Regex SancovFileRegex("(.*)\\.[0-9]+\\.sancov");
+static const Regex SymcovFileRegex(".*\\.symcov");
 
 // --------- MAIN DATASTRUCTURES ----------
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68091.221982.patch
Type: text/x-patch
Size: 538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190926/d2967ece/attachment.bin>


More information about the llvm-commits mailing list