summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy
Commit message (Collapse)AuthorAgeFilesLines
...
* Determine support for colored output from stdout instead of stderr since ↵Craig Topper2014-03-031-1/+1
| | | | | | that's where the diagnostics go. llvm-svn: 202680
* Add a level parameter to ClangTidyCheck::diag.Peter Collingbourne2014-03-022-3/+5
| | | | | | | | | The goal is to make it possible for checks to emit diagnostics at levels other than 'warning'. Differential Revision: http://llvm-reviews.chandlerc.com/D2913 llvm-svn: 202668
* [C++11] Replace LLVM_OVERRIDE with 'override'Craig Topper2014-03-028-20/+20
| | | | llvm-svn: 202632
* Added a naive NOLINT implementation.Alexander Kornienko2014-02-281-1/+14
| | | | | | | | | | | | | | | | 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
* Normalized "virtual" and "LLVM_OVERRIDE" usage in clang-tidy.Alexander Kornienko2014-02-278-37/+33
| | | | | | | | | | | | Reviewers: klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2894 llvm-svn: 202392
* [CMake] Use LINK_LIBS instead of target_link_libraries().NAKAMURA Takumi2014-02-263-6/+6
| | | | llvm-svn: 202238
* [CMake] Apply DEPENDS to clangTidy.NAKAMURA Takumi2014-02-231-0/+3
| | | | llvm-svn: 201977
* Re-add the '!' removed by mistake.Alexander Kornienko2014-02-131-1/+1
| | | | llvm-svn: 201343
* Clang-tidy: don't create ASTConsumers not needed for the set of checks we ↵Alexander Kornienko2014-02-132-10/+17
| | | | | | | | | | | | | | | | | | perform. Summary: This doesn't have any significant effect on the performance, but it looks like a good thing to do. Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2763 llvm-svn: 201340
* Fix ExplicitConstructorCheck to warn only on in-class declarations.Alexander Kornienko2014-02-131-10/+12
| | | | | | | | | | | | | | | | Summary: I'm not absolutely sure this is 100% correct solution, but it seems to do what I expect. Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2756 llvm-svn: 201308
* Consume checker names from clang static analyzer.Alexander Kornienko2014-02-121-1/+2
| | | | | | | | | | | | | | Summary: This patch depends on patches D2556 and D2557. Reviewers: klimek Reviewed By: klimek CC: cfe-commits, jordan_rose, krememek Differential Revision: http://llvm-reviews.chandlerc.com/D2620 llvm-svn: 201221
* The diagnostic printer expects the LangOptions to still be alive. Give it ↵Nick Lewycky2014-02-061-2/+3
| | | | | | one that lives at least as long as all the uses of it. This is still wrong though, we should be passing in the correct LangOpts for a given source file. llvm-svn: 200952
* Improve clang-tidy diagnostic output and filtering.Alexander Kornienko2014-02-063-52/+126
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces several improvements to clang-tidy diagnostic; 1. Make filtering of messages from non-user code more reliable. Output an error when it or any of the related notes touches user code. This fixes an assertion when an error has a location in a system header, and one of the notes relates to user code. 2. In order for 1. to work, subscribe to the static analyzer diagnostics using a custom PathDiagnosticConsumer. 3. Enable colors on supported terminals. 4. Output FixItHints. Reviewers: djasper Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2714 llvm-svn: 200924
* Make the OptionCategory variable static.Alexander Kornienko2014-02-051-1/+1
| | | | llvm-svn: 200841
* Fix crash when handling an argument parsing-related warning.Alexander Kornienko2014-02-031-1/+3
| | | | | | | | | | | | | | Summary: Don't crash on warnings coming before the translation unit starts. Reviewers: klimek, djasper Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2676 llvm-svn: 200702
* Fix another invalid getCustomDiagID() use to unbreak the buildAlp Toker2014-01-262-4/+4
| | | | | | | | It was calling the utility wrapper that now requires a constant string following clang r200132. The StringRef version on DiagnosticIDs appears to have been what was intended so change to that. llvm-svn: 200142
* Prospective build fix for unsafe usage of getCustomDiagID()Alp Toker2014-01-261-3/+3
| | | | | | | | | This now requires a compile-time constant string so let's build proper diagnostic IDs and pass through the inputs as arguments. Tracks clang changes in r200132. llvm-svn: 200139
* Add the check name to the clang-tidy diagnostic output.Alexander Kornienko2014-01-137-23/+69
| | | | | | | | | | | | | | | | | 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
* Re-applied r198807, r198808 with an additional change to fix linking in ↵Alexander Kornienko2014-01-094-81/+123
| | | | | | configure Release+Asserts build. llvm-svn: 198875
* Reverted r198807, r198808, as they cause link errors in configure builds. ↵Alexander Kornienko2014-01-094-123/+81
| | | | | | Will look at this later. llvm-svn: 198832
* Updated file comment.Alexander Kornienko2014-01-081-2/+3
| | | | llvm-svn: 198808
* Restructured code, no functional changes.Alexander Kornienko2014-01-084-81/+122
| | | | | | | | | | | | | | | | | Summary: Moved implementation of classes declared in ClangTidyDiagnosticConsumer.h to ClangTidyDiagnosticConsumer.cpp. Added a FIXME note in ClangTidyDiagnosticConsumer::HandleDiagnostic. Reviewers: klimek, djasper Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2520 llvm-svn: 198807
* Don't emit diagnostics for system headers.Alexander Kornienko2014-01-081-0/+4
| | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2519 llvm-svn: 198767
* Run llvm/utils/sort_includes.py over the Clang tools code. This doesn'tChandler Carruth2014-01-074-8/+8
| | | | | | | | | | always produce as pretty of results as it does in LLVM and Clang, but I don't mind and the value of having a single canonical ordering is very high IMO. Let me know if you spot really serious problems here. llvm-svn: 198703
* A follow-up to r198426: move AnalysisConsumer.h to include/clang/...Alexander Kornienko2014-01-031-2/+1
| | | | llvm-svn: 198427
* Clear the diagnostic buffer after flushing it.Alexander Kornienko2014-01-031-2/+6
| | | | | | | | | | | | Reviewers: klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2504 llvm-svn: 198423
* Rework of r198404 to avoid changes in the build configuration.Alexander Kornienko2014-01-032-5/+1
| | | | llvm-svn: 198405
* clang-tody: Rework r198403, to fix build.NAKAMURA Takumi2014-01-032-4/+4
| | | | llvm-svn: 198404
* clang-tidy: Fix build since r198402 in the case that the source tree of ↵NAKAMURA Takumi2014-01-032-2/+6
| | | | | | | clang-tools-extra is not located on clang/tools/extra. FIXME: Get rid of private headers in other modules. llvm-svn: 198403
* Refactored Clang-tidy for better reusability.Alexander Kornienko2014-01-033-175/+153
| | | | | | | | | | | | | | | | | | | | | | Summary: Made ClangTidyAction more slim and moved its declaration to header to allow easy creation of Clang-tidy ASTConsumer. Don't derive from clang::ento::AnalysisAction, use clang::ento::CreateAnalysisConsumer instead (I'll propose making this function a part of a public API in a separate patch). Use MultiplexConsumer instead of a custom class. Don't re-filter checkers list for each TU. Reviewers: klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2481 llvm-svn: 198402
* Clang-tidy: added --disable-checks, --list-checks options.Alexander Kornienko2013-12-195-57/+152
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix the usage of the CommonOptionsParser ctor changed in r197139.Alexander Kornienko2013-12-121-2/+1
| | | | llvm-svn: 197141
* [CMake] clang-tools-extra: Update dependencies.NAKAMURA Takumi2013-12-104-11/+16
| | | | llvm-svn: 196860
* [CMake] clang-tools-extra may not depend on LLVM CodeGen.NAKAMURA Takumi2013-12-092-9/+1
| | | | llvm-svn: 196805
* Fix a variety of user-visible and comment typosAlp Toker2013-12-011-1/+1
| | | | llvm-svn: 196038
* Always add core checkers if static analyzer checks are enabled.Manuel Klimek2013-11-151-1/+8
| | | | | | | In response to post-commit feedback by Jordan, this is required to make sure path-sensitive checks work correctly. llvm-svn: 194807
* Make clang's static analyzer checks available through clang-tidy.Manuel Klimek2013-11-147-110/+247
| | | | | | | | | | | | | This is implemented in a way that the current static analyzer architecture allows, in the future we might want to revisit this. With this change static analyzer checks are available from clang-tidy by specifying -checks=clang-analyzer-<name>. This change also fixes the use of the compilation database to allow clang-tidy to be used like any other clang tool. llvm-svn: 194707
* clang-tidy's modules depend on it.Benjamin Kramer2013-08-042-0/+2
| | | | | | Fixes shared cmake build. llvm-svn: 187708
* Fix clang-tidy dependencies and bad file comment.Daniel Jasper2013-08-045-11/+17
| | | | | | This addresses comments in post-commit review of r187345. llvm-svn: 187707
* Remove dead #includes.Hans Wennborg2013-07-311-2/+0
| | | | llvm-svn: 187536
* Fix build error caused by r187345.Daniel Jasper2013-07-291-2/+2
| | | | llvm-svn: 187346
* Initial architecture for clang-tidy.Daniel Jasper2013-07-2919-0/+1003
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