dexonsmith accepted this revision. dexonsmith added a comment. LGTM! I also have a couple of optional suggestions to consider.
================ Comment at: clang/include/clang/Basic/CodeGenOptions.h:286 + + bool isEnabled() const { return Regex != nullptr; } + ---------------- This could also be: ``` explicit operator bool() const { return Regex != nullptr } ``` ================ Comment at: clang/include/clang/Basic/CodeGenOptions.h:288-291 + bool match(StringRef String, SmallVectorImpl<StringRef> *Matches = nullptr, + std::string *Error = nullptr) const { + return isEnabled() && Regex->match(String, Matches, Error); + } ---------------- Another option would be: ``` llvm::Regex *operator->() const { return Regex.get(); } ``` treating `RemarkPattern` as a pointer wrapper (that also knows the `std::string`). WDYT? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96036/new/ https://reviews.llvm.org/D96036 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits