summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/tool
Commit message (Collapse)AuthorAgeFilesLines
...
* Teach clang-tidy how to upgrade warnings into errors.Jonathan Roelofs2016-01-131-10/+28
| | | | | | | | | Similar in format to the `-checks=` argument, this new `-warnings-as-errors=` argument upgrades any warnings emitted by the former to errors. http://reviews.llvm.org/D15528 llvm-svn: 257642
* [clang-tidy] Fix configure buildAlexander Kornienko2015-12-301-1/+2
| | | | llvm-svn: 256633
* [clang-tidy] Add UnnecessaryCopyInitialization check to new "performance" ↵Alexander Kornienko2015-12-302-0/+6
| | | | | | | | | | | | | | | | | | | module in ClangTidy Summary: The patch adds a new ClangTidy check that detects when expensive-to-copy types are unnecessarily copy initialized from a const reference that has the same or are larger scope than the copy. It currently only detects this when the copied variable is const qualified. But this will be extended to non const variables if they are only used in a const fashion. Reviewers: alexfh Subscribers: cfe-commits Patch by Felix Berger! Differential Revision: http://reviews.llvm.org/D15623 llvm-svn: 256632
* Fix problem with Clang-tidy parallel configure build.Eugene Zelenko2015-11-251-2/+2
| | | | | | Differential revision: http://reviews.llvm.org/D14964 llvm-svn: 254081
* Add a new module for the C++ Core Guidelines, and the first checker for ↵Aaron Ballman2015-10-063-0/+7
| | | | | | | | those guidelines: cppcoreguidelines-pro-type-reinterpret-cast. Patch by Matthias Gehre! llvm-svn: 249399
* Taking a stab at fixing failing build bots that use make. Unfortunately, the ↵Aaron Ballman2015-10-021-4/+3
| | | | | | | | build logs do not point to much useful information for tracking this down, such as: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/31782/steps/compile/logs/stdio llvm-svn: 249136
* Adding a new clang-tidy module to house CERT-specific checkers, and map ↵Aaron Ballman2015-10-023-2/+9
| | | | | | existing checkers to CERT secure coding rules and recommendations for both C (https://www.securecoding.cert.org/confluence/display/c/SEI+CERT+C+Coding+Standard) and C++ (https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=637). llvm-svn: 249130
* [clang-tidy] add option to specify build pathGuillaume Papin2015-09-281-4/+11
| | | | | | | | | | | | | | | | | | Summary: compile_commands.json is usually generated in the build directory. Projects like LLVM/Clang enforce out-of-source builds. This option allow allow such projects to work out of the box, without moving the compilation database manually. The naming of the option is similar to the one use by other tools: clang-{check,modernize,query,rename,tidy} -p=<build_path> <...> Reviewers: alexfh Differential Revision: http://reviews.llvm.org/D13199 llvm-svn: 248723
* [clang-tidy] install helper scriptsAlexander Kornienko2015-09-172-0/+21
| | | | | | | | | | | | | | | | | | Scripts are installed in same location as clang-fromat ones, so I think will be good idea to not create dedicated directory. I checked this patch on my own build on RHEL 6. Please check it in if it's OK, because I don't have SVN write access. I think will be good idea to backport this patch to 3.7 release branch. Probably same should be done for configure build. Patch by Eugene Zelenko! Differential revision: http://reviews.llvm.org/D12700 llvm-svn: 247890
* [clang-tidy] Improve the help text for -dump-config.Alexander Kornienko2015-09-161-2/+4
| | | | llvm-svn: 247792
* [clang-tidy] Update check name in the comment. NFC.Alexander Kornienko2015-09-151-1/+1
| | | | llvm-svn: 247682
* [clang-tidy] Fix run-clang-tidy.py.Alexander Kornienko2015-09-081-2/+2
| | | | | | | | | | | | Do not add "-*" to the list of checks. Make consistent the list of enabled checks and the checks in use. Moreover, removing "-*" makes the behaviour consistent with clang-tidy and allows user to use .clang-tidy configuration... http://reviews.llvm.org/D12687 Patch by Marek Kurdej! llvm-svn: 247002
* Add \n to the regex in clang-tidy-diff.py in order to fix ↵Yaron Keren2015-09-011-1/+1
| | | | | | | | http://llvm.org/PR24637, git usecase for multiple files diff. llvm-svn: 246575
* Tweak clang-tidy-diff.py to recognize "filename" in the diff ourput.Yaron Keren2015-08-211-1/+1
| | | | llvm-svn: 245683
* Tweak clang-tidy-diff.py to pass JSON argument correctly to clang-tidy on ↵NAKAMURA Takumi2015-08-201-2/+8
| | | | | | | | | | | win32 arg parser. - Single quotation is not recognized. - Use """ to pass a double quotation. It also reverts r211831. llvm-svn: 245567
* [clang-tidy] Fix LoopConvertCheck bug.Alexander Kornienko2015-08-191-5/+10
| | | | | | | | | | | | Fix LoopConvertCheck bug: StringRef to temporaries. Also add LLVM_ATTRIBUTE_UNUSED to ModernizeModuleAnchorDestination. http://reviews.llvm.org/D12157 Patch by Angel Garcia! llvm-svn: 245458
* [clang-tidy] Fix a use-after-free.Alexander Kornienko2015-08-171-1/+1
| | | | llvm-svn: 245215
* [clang-tidy] Allow use of -list-checks option without need to pass source files.Alexander Kornienko2015-08-171-6/+17
| | | | | | | | | | | | Initialize CommonOptionsParser with ZeroOrOne NumOccurrenceFlag so callers can pass -list-checks without the need to pass additional positional parameters, then add dummy file if none were supplied. http://reviews.llvm.org/D12070 Patch by Don Hinton! llvm-svn: 245205
* [clang-tidy] Create clang-tidy module modernize. Add pass-by-value check.Alexander Kornienko2015-08-143-3/+8
| | | | | | | | | | This is the first step for migrating cppmodernize to clang-tidy. http://reviews.llvm.org/D11946 Patch by Angel Garcia! llvm-svn: 245045
* Silence gcc 5.1 unused variable warnings using LLVM_ATTRIBUTE_UNUSED.Yaron Keren2015-08-071-4/+4
| | | | llvm-svn: 244329
* Updating the documentation for clang-tidy. Removes some non-ASCII characters ↵Aaron Ballman2015-07-271-2/+2
| | | | | | from the documentation, and removes shell-specific single quote characters as they cause issues for some shells (such as on Windows). llvm-svn: 243266
* Make helpers static. clang-tools edition.Benjamin Kramer2015-03-231-2/+2
| | | | | | Also purge dead code found by it. NFC. llvm-svn: 232948
* Add clangBasic to libdeps according to r232051 since the interface of ↵NAKAMURA Takumi2015-03-131-0/+1
| | | | | | ASTMatchers was changed. llvm-svn: 232138
* Revert "Adapt clang-tools-extra to clang module format changes."Adrian Prantl2015-02-251-3/+2
| | | | | | This reverts commit 230424. llvm-svn: 230456
* Adapt clang-tools-extra to clang module format changes.Adrian Prantl2015-02-251-2/+3
| | | | | | | - add clangCodeGen.a to the tools that need it - tweak pp-trace command line handling to not conflict with clang's. llvm-svn: 230424
* Revert "Adapt Makefile dependencies for the clang module format change in ↵Adrian Prantl2015-02-211-3/+2
| | | | | | r230089." llvm-svn: 230104
* Adapt Makefile dependencies for the clang module format change in r230089.Adrian Prantl2015-02-201-2/+3
| | | | llvm-svn: 230090
* [clang-tidy] Fix a typo.Alexander Kornienko2014-12-091-2/+3
| | | | llvm-svn: 223777
* [clang-tidy] Update help messages and docs.Alexander Kornienko2014-12-031-6/+21
| | | | | | Fixed incorrect examples of configuration, clarified the usage of -dump-config. llvm-svn: 223235
* [clang-tidy] Added -fix-errors optionAlexander Kornienko2014-11-031-4/+26
| | | | | | | | | | | | | | | | | | Summary: Added -fix-errors option to allow applying fixes when compiler errors are present. Without this flag -fix would bail out if there are compiler errors. This is needed to avoid applying wrong fixes if Clang fails to recover from compilation errors correctly. Reviewers: djasper, klimek Reviewed By: klimek Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D6059 llvm-svn: 221152
* Fix Makefiles after r220867.Daniel Jasper2014-10-291-3/+3
| | | | llvm-svn: 220868
* Shrink the set of checks enabled by default.Alexander Kornienko2014-10-291-5/+4
| | | | | | | | | | | | | | | | Summary: Enable only compiler diagnostics and safe static analyzer checks by default. Let the defaults be conservative and safe for an average project. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6027 llvm-svn: 220865
* [clang-tidy] Added -system-headers option.Alexander Kornienko2014-10-281-0/+7
| | | | | | | Added -system-headers option to allow display of warnings from system headers. This is needed for testing libcxx, for example. llvm-svn: 220826
* [clang-tidy] Bring order to check registration.Alexander Kornienko2014-10-262-0/+5
| | | | | | | | | | | | | | | | Summary: Register readability checks in a separate module. Renamed the checks and test file names accordingly. Reviewers: djasper, klimek Reviewed By: klimek Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D5936 llvm-svn: 220631
* Add flag --enable-check-profile to clang-tidy.Samuel Benzaquen2014-10-231-1/+51
| | | | | | | | | | | | | | | Summary: Add flag --enable-check-profile to clang-tidy. It turns on per-matcher profiles in MatchFinder and prints a report to stderr at the end. Reviewers: alexfh Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D5937 llvm-svn: 220491
* Fix a typoAlexander Kornienko2014-09-261-1/+1
| | | | llvm-svn: 218512
* [clang-tidy] Add a -config={YAML} option.Alexander Kornienko2014-09-261-6/+35
| | | | | | | | | | | | | | | | Summary: Add -config option to allow specifying configuration in YAML/JSON format on the command line. Reviewers: klimek Reviewed By: klimek Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D5501 llvm-svn: 218511
* Provide user name in ClangTidyOptions.Alexander Kornienko2014-09-241-5/+10
| | | | | | | | | | | | | | | | | | | Summary: This adds the ClangTidyOptions::User field and fills it from the USER or the USERNAME environment variable, if possible. The FileOptionsProvider now takes "default" options instead of "fallback" options, as it now uses these when an option is not set in the configuration file (one exception is the checks list). Reviewers: bkramer, klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5440 llvm-svn: 218402
* Add missing dependency.Alexander Kornienko2014-09-221-2/+2
| | | | llvm-svn: 218249
* run-clang-tidy.py: don't fail when running without -checks=.Alexander Kornienko2014-09-221-2/+5
| | | | llvm-svn: 218227
* Implemented clang-tidy-check-specific options.Alexander Kornienko2014-09-121-0/+1
| | | | | | | | | | | | | | | | | 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
* Moved main() to the clang::tidy namespace, no functional changes.Alexander Kornienko2014-09-101-22/+24
| | | | llvm-svn: 217493
* run-clang-tidy: Make clang-tidy path configurable and don't fail as horriblyBenjamin Kramer2014-09-081-9/+23
| | | | | | when it's not around. llvm-svn: 217374
* [clang-tidy] Add a little python script that can run clang-tidy and apply ↵Benjamin Kramer2014-09-081-0/+175
| | | | | | | | | | | | | | | | fixes over an entire codebase. Ever wanted to fix all the header guards in clang? Now it's easy. Make sure clang-tidy is in $PATH and a compilation database is available. $ ./run-clang-tidy.py -checks=-*,llvm-header-guard -fix ... get coffee (or more CPU cores) ... $ svn diff Some may argue that this is just a glorified xargs -P, but it does a bit more ;) Differential Revision: http://reviews.llvm.org/D5188 llvm-svn: 217368
* Don't write files with no fixes.Alexander Kornienko2014-09-041-1/+1
| | | | llvm-svn: 217163
* Implemented clang-tidy configurability via .clang-tidy files.Alexander Kornienko2014-09-041-15/+51
| | | | | | | | | | | | | | | | | Summary: This adds a support for the .clang-tidy file reading using FileOptionsProvider, -dump-config option, and changes tests to not depend on default checks set. Reviewers: klimek, bkramer, djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5186 llvm-svn: 217155
* [clang-tidy] Add an option to export suggested fixes into a file.Benjamin Kramer2014-09-041-0/+17
| | | | | | | | Allows gathering fixes and applying them with clang-apply-fixes. Differential Revision: http://reviews.llvm.org/D5176 llvm-svn: 217139
* Fix linking in the Makefile build.Benjamin Kramer2014-08-131-1/+1
| | | | llvm-svn: 215550
* Track clang r213171Alp Toker2014-07-161-1/+1
| | | | | | The clang rewriter is now a core facility. llvm-svn: 213172
* Make clang-tidy-diff.py py3-compatible.NAKAMURA Takumi2014-06-271-1/+1
| | | | llvm-svn: 211834
OpenPOWER on IntegriCloud