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