summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/ArgumentCommentCheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] rename_check.py misc-argument-comment bugprone-argument-commentAlexander Kornienko2017-11-231-308/+0
| | | | | | | | | | | | | | Summary: + manually convert the unit test to lit test. Reviewers: hokein Reviewed By: hokein Subscribers: mgorny, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D40392 llvm-svn: 318926
* [clang-tidy] misc-argument-comment - extended gmock supportAlexander Kornienko2017-02-071-22/+32
| | | | | | | It looks like direct calls to mocked methods happen in the wild. This patch add support for these as well. llvm-svn: 294293
* [clang-tidy] misc-argument-comment support for gmockAlexander Kornienko2017-02-061-45/+124
| | | | | | | | Now for real. The use case supported previously is used by approximately nobody. What's needed is support for matching argument comments in EXPECT_xxx calls to the names of parameters of the mocked methods. llvm-svn: 294193
* [clang-tidy] misc-argument-comment support for gmockAlexander Kornienko2017-02-021-0/+17
| | | | llvm-svn: 293845
* [clang-tidy] misc-argument-comment: ignore comments after argumentsAlexander Kornienko2017-02-011-2/+5
| | | | llvm-svn: 293771
* modernize-use-auto NFC fixesPiotr Padlewski2016-12-141-1/+1
| | | | llvm-svn: 289656
* [clang-tools-extra] Format sources with clang-format. NFC.Mandeep Singh Grang2016-11-081-2/+2
| | | | | | | | | | | | | | | | Summary: Ran clang-format on all .c/.cpp/.h files in clang-tools-extra. Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories. Reviewers: klimek, alexfh Subscribers: nemanjai Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D26329 llvm-svn: 286221
* [clang-tidy] misc-argument-comment non-strict modeAlexander Kornienko2016-08-041-22/+37
| | | | | | | | | | | | | | | | | Summary: The misc-argument-comment check now ignores leading and trailing underscores and case. The new `StrictMode` local/global option can be used to switch back to strict checking. Add getLocalOrGlobal version for integral types, minor cleanups. Reviewers: hokein, aaron.ballman Subscribers: aaron.ballman, Prazek, cfe-commits Differential Revision: https://reviews.llvm.org/D23135 llvm-svn: 277729
* [clang-tidy] misc-argument-comment: don't bail out when an argument is a ↵Alexander Kornienko2016-06-081-11/+8
| | | | | | | | macro expansion (e.g. NULL). Add CHECK-FIX tests. llvm-svn: 272155
* Refactors AST matching code to use the new AST matcher names. This patch ↵Aaron Ballman2015-09-171-2/+2
| | | | | | correlates to r247885 which performs the AST matcher rename in Clang. llvm-svn: 247886
* [clang-tidy] Refactor: Move misc clang-tidy checks to namespace ↵Alexander Kornienko2015-03-021-0/+2
| | | | | | | | | | | | | clang::tidy::misc clang-tidy checks are organized into modules. This refactoring moves the misc module checks into the namespace clang::tidy::misc http://reviews.llvm.org/D7996 Patch by Richard Thomson! llvm-svn: 230950
* Implemented clang-tidy-check-specific options.Alexander Kornienko2014-09-121-2/+4
| | | | | | | | | | | | | | | | | Summary: Each check can implement readOptions and storeOptions methods to read and store custom options. Each check's options are stored in a local namespace to avoid name collisions and provide some sort of context to the user. Reviewers: bkramer, klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5296 llvm-svn: 217661
* ClangTidy misc-argument-comment check: don't check arguments to templateAlexander Kornienko2014-09-031-0/+9
| | | | | | | | | | | | | | | | | | | parameter packs. Summary: This disables this check for std::bind and similar functions that use parameter packs to forward arguments to a different function. Name of the parameter pack argument doesn't matter. Reviewers: klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5168 llvm-svn: 217039
* [clang-tidy] Rewrite a for-range loop in the old style.Benjamin Kramer2014-08-041-3/+3
| | | | | | | | Haven't thought that I ever needed to do this, but in this case comparing the index using pointer arithmetic turns out to be really ugly. It also generates nasty sign-compare warnings on 32 bit targets. llvm-svn: 214705
* Don't warn on NewCallback argument comments, as they are arguments for theAlexander Kornienko2014-07-301-4/+9
| | | | | | | | | | | | | | function the callback points to. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4722 llvm-svn: 214307
* clang-tidy/ArgumentCommentCheck: Initializer list in non-static members is ↵NAKAMURA Takumi2014-03-181-0/+3
| | | | | | unavailable on msc17. llvm-svn: 204121
* Add an argument comment checker to clang-tidy.Peter Collingbourne2014-03-181-0/+166
This checks that parameters named in comments that appear before arguments in function and constructor calls match the parameter name used in the callee's declaration. For example: void f(int x, int y); void g() { f(/*y=*/0, /*z=*/0); } contains two violations of the policy, as the names 'x' and 'y' used in the declaration do not match names 'y' and 'z' used at the call site. I think there is significant value in being able to check/enforce this policy as a way of guarding against accidental API misuse and silent breakages caused by API changes. Although this pattern appears somewhat frequently in the LLVM codebase, this policy is not prescribed by the LLVM coding standards at the moment, so it lives under 'misc'. Differential Revision: http://llvm-reviews.chandlerc.com/D2914 llvm-svn: 204113
OpenPOWER on IntegriCloud