aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CloneModule.cpp
diff options
context:
space:
mode:
authorEtienne Bergeron <etienneb@google.com>2016-03-31 18:12:23 +0000
committerEtienne Bergeron <etienneb@google.com>2016-03-31 18:12:23 +0000
commit3e4adf17625595d9425fb8109126af22475f54c0 (patch)
tree6f56b1b5347bb7ffadff6b59fc0371e29ad42ed2 /llvm/lib/Transforms/Utils/CloneModule.cpp
parent4badd6aaf30859ce9b89960d8cae2b9ecd1dacca (diff)
downloadllvm-3e4adf17625595d9425fb8109126af22475f54c0.zip
llvm-3e4adf17625595d9425fb8109126af22475f54c0.tar.gz
llvm-3e4adf17625595d9425fb8109126af22475f54c0.tar.bz2
[clang-tidy] Add a new checker to detect missing comma in initializer list.
Summary: This checker is able to detect missing comma in an array of string literals. ``` const char* A[] = { "abc", "def" // missing comma (no compiler warnings) "ghi", }; ``` The ratio of false-positive is reduced by restricting the size of the array considered and the ratio of missing comma. To validate the quantity of false positive, the checker was tried over LLVM and chromium code and detected these cases: [[ http://reviews.llvm.org/D18454 | http://reviews.llvm.org/D18454 ]] [[https://codereview.chromium.org/1807753002/ | https://codereview.chromium.org/1807753002/]] [[https://codereview.chromium.org/1826193002/ | https://codereview.chromium.org/1826193002/]] [[https://codereview.chromium.org/1805713002/ | https://codereview.chromium.org/1805713002/]] Reviewers: alexfh Subscribers: LegalizeAdulthood, szdominik, xazax.hun, cfe-commits Differential Revision: http://reviews.llvm.org/D18457 llvm-svn: 265033
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneModule.cpp')
0 files changed, 0 insertions, 0 deletions