[clang-tidy] Fix bugprone-argument-comment bug: negative literal number is not checked.
authorAlexander Kornienko <alexfh@google.com>
Thu, 5 Sep 2019 14:13:57 +0000 (14:13 +0000)
committerAlexander Kornienko <alexfh@google.com>
Thu, 5 Sep 2019 14:13:57 +0000 (14:13 +0000)
commitb6d9703050d0d9ca903576767bc83df783362186
tree547ad98156e269487ddb0db84de1662cf69c34d6
parent4e14bf71b70b6c1e356b571611d143d8facda86b
[clang-tidy] Fix bugprone-argument-comment bug: negative literal number is not checked.

Summary:
For example:
```
void foo(int a);
foo(-2);
```
should be fixed as:
```
foo(/*a=*/-2);
```
This change tries to fix this issue.

Reviewers: alexfh, hokein, aaron.ballman

Reviewed By: alexfh, aaron.ballman

Subscribers: xazax.hun, cfe-commits

Tags: #clang, #clang-tools-extra

Patch by Yubo Xie.

Differential Revision: https://reviews.llvm.org/D67084

llvm-svn: 371072
clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp
clang-tools-extra/test/clang-tidy/bugprone-argument-comment-literals.cpp