[llvm] r300520 - Add const to a const method. NFC

George Burgess IV via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 18:04:05 PDT 2017


Author: gbiv
Date: Mon Apr 17 20:04:05 2017
New Revision: 300520

URL: http://llvm.org/viewvc/llvm-project?rev=300520&view=rev
Log:
Add const to a const method. NFC

Modified:
    llvm/trunk/include/llvm/Support/Regex.h
    llvm/trunk/lib/Support/Regex.cpp

Modified: llvm/trunk/include/llvm/Support/Regex.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Regex.h?rev=300520&r1=300519&r2=300520&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Regex.h (original)
+++ llvm/trunk/include/llvm/Support/Regex.h Mon Apr 17 20:04:05 2017
@@ -57,7 +57,7 @@ namespace llvm {
 
     /// isValid - returns the error encountered during regex compilation, or
     /// matching, if any.
-    bool isValid(std::string &Error);
+    bool isValid(std::string &Error) const;
 
     /// getNumMatches - In a valid regex, return the number of parenthesized
     /// matches it contains.  The number filled in by match will include this

Modified: llvm/trunk/lib/Support/Regex.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Regex.cpp?rev=300520&r1=300519&r2=300520&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Regex.cpp (original)
+++ llvm/trunk/lib/Support/Regex.cpp Mon Apr 17 20:04:05 2017
@@ -48,7 +48,7 @@ Regex::~Regex() {
   }
 }
 
-bool Regex::isValid(std::string &Error) {
+bool Regex::isValid(std::string &Error) const {
   if (!error)
     return true;
   




More information about the llvm-commits mailing list