[PATCH] D66463: Regex: +isValid() with no parameter

Jan Kratochvil via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 09:06:25 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL369396: Regex: Add isValid() with no parameter (authored by jankratochvil, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D66463?vs=216087&id=216170#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66463/new/

https://reviews.llvm.org/D66463

Files:
  llvm/trunk/include/llvm/Support/Regex.h


Index: llvm/trunk/include/llvm/Support/Regex.h
===================================================================
--- llvm/trunk/include/llvm/Support/Regex.h
+++ llvm/trunk/include/llvm/Support/Regex.h
@@ -60,6 +60,7 @@
     /// isValid - returns the error encountered during regex compilation, or
     /// matching, if any.
     bool isValid(std::string &Error) const;
+    bool isValid() const { return !error; }
 
     /// getNumMatches - In a valid regex, return the number of parenthesized
     /// matches it contains.  The number filled in by match will include this


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66463.216170.patch
Type: text/x-patch
Size: 575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190820/b72eb120/attachment.bin>


More information about the llvm-commits mailing list