summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/ClangTidyModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change getChecksFilter() interface to hide implementation details.Alexander Kornienko2017-05-171-2/+1
| | | | llvm-svn: 303264
* Apply performance-unnecessary-value-param to clang-tidy.Benjamin Kramer2016-06-151-1/+1
| | | | | | With minor manual tweaks. No functionality change intended. llvm-svn: 272795
* [clang-tidy] Default options in modules.Alexander Kornienko2014-10-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch allows modules to specify default options for the checks defined in them. This way a sufficiently configurable check can be registered in multiple modules with different default options. E.g. the SpacesBeforeComments option may be set to 1 for the "llvm-namespace-comments" check and to 2 for the "google-readability-namespace-comment" check without modifying or extending the check code. This patch also registers the google-readability-braces-around-statements check with suitable defaults. Reviewers: djasper Reviewed By: djasper Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D5798 llvm-svn: 219923
* Implemented clang-tidy-check-specific options.Alexander Kornienko2014-09-121-8/+7
| | | | | | | | | | | | | | | | | 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
* std::function-ize ClangTidyCheckFactories.Alexander Kornienko2014-09-101-4/+4
| | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5289 llvm-svn: 217492
* Unique-ptrify ClangTidyCheckFactories. Add a more convenient alternative toAlexander Kornienko2014-09-101-8/+3
| | | | | | | | | | | | | | addCheckFactory: registerCheck. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5288 llvm-svn: 217489
* Rename ChecksFilter to GlobList, as there's nothing specific to checks in it.Alexander Kornienko2014-08-061-3/+2
| | | | | | | | | | | | | | | | | | Summary: Rename ChecksFilter to GlobList, as there's nothing specific to checks in it. It's a rather generic way to represent sets of strings (or patterns), so it may be used for something else in ClangTidy. The new name would not look strange when used to filter other entities. Reviewers: klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4806 llvm-svn: 214961
* Allow per-file clang-tidy options.Alexander Kornienko2014-06-051-2/+3
| | | | | | | | | | | | | | | | | | Summary: This patch makes it possible for clang-tidy clients to provide different options for different translation units. The option, which doesn't make sense to be file-dependent, was moved to a separate ClangTidyGlobalOptions struct. Added parsing of ClangTidyOptions. Reviewers: klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3979 llvm-svn: 210260
* Post-filter clang-tidy diagnostic messages.Alexander Kornienko2014-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements filtering of clang-tidy diagnostic messages by the check name, so that "clang-tidy -checks=^llvm-" won't output any clang warnings, for example. This is also helpful to run specific static-analyzer checks: static analyzer always needs core checks to be enabled, but the user may be interested only in the checks he asked for. This patch also exposes warning option names for built-in diagnostics. We need to have a namespace for these names to avoid collisions and to allow convenient filtering, so I prefix them with "-W". I'm not sure it's the best thing to do, and maybe "W" or "clang-diagnostic-" or something like this would be better. Reviewers: klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3121 llvm-svn: 204321
* Use range-based for loops for better readability. No functional changes ↵Alexander Kornienko2014-03-061-10/+7
| | | | | | | | | | | | | | intended. Reviewers: chandlerc Reviewed By: chandlerc CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2979 llvm-svn: 203101
* Add the check name to the clang-tidy diagnostic output.Alexander Kornienko2014-01-131-2/+5
| | | | | | | | | | | | | | | | | Summary: Pass check names all the way from ClangTidyModule through ClangTidyCheck and ClangTidyContext to ClangTidyError, and output it in handleErrors. This allows to find mis-behaving check and disable it easily. Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2534 llvm-svn: 199094
* Clang-tidy: added --disable-checks, --list-checks options.Alexander Kornienko2013-12-191-14/+6
| | | | | | | | | | | | | | | | | | | | | | | Summary: Allow disabling checks by regex. By default, disable alpha.* checks, that are not particularly good tested (e.g. IdempotentOperationChecker, see http://llvm-reviews.chandlerc.com/D2427). Fixed a bug, that would disable all analyzer checks, when using a regex more strict, than 'clang-analyzer-', for example --checks='clang-analyzer-deadcode-'. Added --list-checks to list all enabled checks. This is useful to test specific values in --checks/--disable-checks. Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2444 llvm-svn: 197717
* Initial architecture for clang-tidy.Daniel Jasper2013-07-291-0/+49
This is the first version of a possible clang-tidy architecture. The purpose of clang-tidy is to detect errors in adhering to common coding patterns, e.g. described in the LLVM Coding Standards. This is still heavily in flux. Review: http://llvm-reviews.chandlerc.com/D884 llvm-svn: 187345
OpenPOWER on IntegriCloud