summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/nolint.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [ClangTidy] Separate tests for infrastructure and checkersDmitri Gribenko2019-10-111-51/+0
| | | | | | | | | | | | | | | | | | | | Summary: This change moves tests for checkers and infrastructure into separate directories, making it easier to find infrastructure tests. Tests for checkers are already easy to find because they are named after the checker. Tests for infrastructure were difficult to find because they were outnumbered by tests for checkers. Now they are in a separate directory. Reviewers: jfb, jdoerfert, lebedev.ri Subscribers: srhines, nemanjai, aheejin, kbarton, christof, mgrang, arphaman, jfb, lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68807 llvm-svn: 374540
* [clang-tidy] NOLINT support for "clang-diagnostic-*".Haojian Wu2019-03-121-1/+2
| | | | | | | | | | | | | | Reviewers: alexfh, aaron.ballman Reviewed By: alexfh Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59255 llvm-svn: 355934
* [clang-tidy] Build it even without static analyzerStephen Kelly2018-10-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | Conditionally compile the parts of clang-tidy which depend on the static analyzer. Funnily enough, I made the patch to exclude this from the build in 2013, and it was committed with the comment that the tool should not be fully excluded, but only the parts of it which depend on the analyzer should be excluded. http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20130617/081797.html This commit implements that idea. Reviewed By: aaron.ballman Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D52334 llvm-svn: 343528
* Reverting r343415 as it breaks at least one of the bots.Aaron Ballman2018-09-301-1/+0
| | | | | | http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/37336 llvm-svn: 343418
* Allow clang-tidy to be built without a dependency on the clang static analyzer.Aaron Ballman2018-09-301-0/+1
| | | | | | Patch by Stephen Kelly. llvm-svn: 343415
* Add support for NOLINT and NOLINTNEXTLINE comments mentioning specific check ↵Aaron Ballman2017-12-141-2/+13
| | | | | | | | | | names. Supports a comma-separated list of check names to be disabled on the given line. Also supports * as a wildcard to disable all lint diagnostic messages on that line. Patch by Anton (xgsa). llvm-svn: 320713
* [clang-tidy] Fix NOLINT testAlexander Kornienko2017-01-241-8/+7
| | | | | | | | | | | | | | | | | | Summary: Test cases I've added in review D26218 were too brittle and weren't working properly. This patch fixes this. Reviewers: alexfh Reviewed By: alexfh Subscribers: cfe-commits Patch by Nikita Kakuev! Differential Revision: https://reviews.llvm.org/D26466 llvm-svn: 292926
* [clang-tidy] Suppress notes for warnings that were ignoredMalcolm Parsons2016-11-021-2/+11
| | | | | | | | Fixes PR30565. Patch by Nikita Kakuev llvm-svn: 285861
* [clang-tidy] fix for NOLINT after macro expansionMatthias Gehre2016-09-241-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: When having ``` c++ #define MACRO code-with-warning MACRO; // NOLINT ``` clang-tidy would still show the warning, because it searched for "NOLINT" only in the first line, not on the second. This caused e.g. https://llvm.org/bugs/show_bug.cgi?id=29089 (where the macro was defined in a system header). See also the added test cases. Now clang-tidy looks at the line of macro invocation and every line of macro definition for a NOLINT comment. Reviewers: alexfh, aaron.ballman, hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24845 llvm-svn: 282330
* [clang-tidy] Apply NOLINT filtering to Clang warnings.Alexander Kornienko2016-05-041-2/+9
| | | | llvm-svn: 268555
* [clang-tidy] google-explicit-constructor: improve the warning messageAlexander Kornienko2015-11-281-5/+3
| | | | | | Also switch some more tests to %check_clang_tidy. llvm-svn: 254216
* [clang-tidy] Support initializer_list in google-explicit-constructor checkAlexander Kornienko2014-11-271-3/+3
| | | | | | | | | | | | | | | | | | | Summary: According to the Google C++ Style Guide, constructors taking a single std::initializer_list<> should not be marked explicit. This change also changes the messages according to conventions used in Clang diagnostics: no capitalization of the first letter, no trailing dot. Reviewers: djasper Reviewed By: djasper Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D6427 llvm-svn: 222878
* Change the behavior of clang-tidy -checks=, remove -disable-checks.Alexander Kornienko2014-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Make checks filtering more intuitive and easy to use. Remove -disable-checks and change the format of -checks= to a comma-separated list of globs with optional '-' prefix to denote exclusion. The -checks= option is now cumulative, so it modifies defaults, not overrides them. Each glob adds or removes to the current set of checks, so the filter can be refined or overriden by adding globs. Example: The default value for -checks= is '*,-clang-analyzer-alpha*,-llvm-include-order,-llvm-namespace-comment,-google-*', which allows all checks except for the ones named clang-analyzer-alpha* and others specified with the leading '-'. To allow all google-* checks one can write: clang-tidy -checks=google-* ... If one needs only google-* checks, we first need to remove everything (-*): clang-tidy -checks=-*,google-* etc. I'm not sure if we need to change something here, so I didn't touch the docs yet. Reviewers: klimek, alexfh Reviewed By: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3770 llvm-svn: 208883
* Print stats on displayed and ignored warnings.Alexander Kornienko2014-05-071-1/+2
| | | | | | | | | | | | | | | | Summary: Also displays a hint to use -header-filter='.*' in case any warnings are in non-user code. This will help discoverability of this option. Reviewers: klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3621 llvm-svn: 208174
* Fix regex bug in clang-tidy.Daniel Jasper2014-04-021-1/+1
| | | | | | | | Also make tests slightly less dependent on default flags. Once we have implemented configuration file support, we might want to store the clang-tidy configuration for the tests there. llvm-svn: 205408
* Added a naive NOLINT implementation.Alexander Kornienko2014-02-281-0/+10
Summary: Added a naive NOLINT implementation. It doesn't care about specific linter categories, just the "// NOLINT" on the same line as a diagnostic. Reviewers: klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2896 llvm-svn: 202452
OpenPOWER on IntegriCloud