diff options
-rw-r--r-- | llvm/include/llvm/Support/Regex.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/Regex.h b/llvm/include/llvm/Support/Regex.h index b05349dee88..ca5e8cd79a6 100644 --- a/llvm/include/llvm/Support/Regex.h +++ b/llvm/include/llvm/Support/Regex.h @@ -60,6 +60,7 @@ namespace llvm { /// 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 |