================
@@ -15,37 +15,84 @@ namespace clang::tidy::google::readability {
 
 class TodoCommentCheck::TodoCommentHandler : public CommentHandler {
 public:
+  enum class StyleKind { Parentheses, Hyphen };
+
   TodoCommentHandler(TodoCommentCheck &Check, std::optional<std::string> User)
       : Check(Check), User(User ? *User : "unknown"),
-        TodoMatch("^// *TODO *(\\(.*\\))?:?( )?(.*)$") {}
+        TodoMatch("^// *TODO *((\\((.*)\\))?:?( )?|: *(.*) *- *)?(.*)$") {
+    llvm::StringRef TodoStyleString = Check.Options.get("Style", "Hyphen");
+    if (TodoStyleString == "Parentheses") {
+      TodoStyle = StyleKind::Parentheses;
+    } else if (TodoStyleString == "Hyphen") {
+      TodoStyle = StyleKind::Hyphen;
+    } else {
----------------
qukhan wrote:

Done!

https://github.com/llvm/llvm-project/pull/165565
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to