[clang-tidy] Allow space between "TODO" and "(user)"

llvm-svn: 219091
This commit is contained in:
Alexander Kornienko 2014-10-05 23:40:30 +00:00
parent 0927da4583
commit 2f03c8a38d
2 changed files with 3 additions and 1 deletions

View File

@ -19,7 +19,7 @@ class TodoCommentCheck::TodoCommentHandler : public CommentHandler {
public: public:
TodoCommentHandler(TodoCommentCheck &Check, llvm::Optional<std::string> User) TodoCommentHandler(TodoCommentCheck &Check, llvm::Optional<std::string> User)
: Check(Check), User(User ? *User : "unknown"), : Check(Check), User(User ? *User : "unknown"),
TodoMatch("^// *TODO(\\(.*\\))?:?( )?(.*)$") {} TodoMatch("^// *TODO *(\\(.*\\))?:?( )?(.*)$") {}
bool HandleComment(Preprocessor &PP, SourceRange Range) override { bool HandleComment(Preprocessor &PP, SourceRange Range) override {
StringRef Text = StringRef Text =

View File

@ -23,3 +23,5 @@
// TODO(bar): // TODO(bar):
// TODO(foo): paint bikeshed // TODO(foo): paint bikeshed
// TODO(b/12345): find the holy grail // TODO(b/12345): find the holy grail
// TODO (b/12345): allow spaces before parentheses
// TODO(asdf) allow missing semicolon