Make a variable local so it's lifetime becomes more obvious.

NFC

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217952 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Add a checker that warns on TODO comments without username.

It also suggests a fix-it, taking the name from $USER. This will be made
configurable eventually.

Differential Revision: http://reviews.llvm.org/D5393

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218049 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Don't leak the TodoCommentHandler object

Preprocessor:addCommentHandler() does not take ownership,
so we'd end up leaking the TodoCommentHandler.

This patch makes it owned by the Check object.

Differential Revision: http://reviews.llvm.org/D5402

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218068 91177308-0d34-0410-b5e6-96231b3b80d8