summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] Make FileOptionsProvider fields protected to make extending it ↵Alexander Kornienko2015-08-121-1/+1
| | | | | | easier llvm-svn: 244793
* Lazily initialize HeaderFilter in ClangTidyDiagnosticConsumer. ThisDaniel Jasper2015-08-122-14/+12
| | | | | | | | | removes a corner case in tests that don't set the diagnostic consumer. In tests, it is good, not to set the diagnostic consumer so that Clang's parsing diagnostics are still displayed in the test output and only ClangTidy's output is analyzed differently. llvm-svn: 244745
* Reinstantiate better diagnostic, this time with a fatal error so we don't ↵Manuel Klimek2015-08-121-2/+7
| | | | | | add a dependency onto gtest from the header. llvm-svn: 244722
* Revert the diagnostic improvements in r244602 as they introduced a ↵David Blaikie2015-08-111-9/+1
| | | | | | | | | | problematic dependency Seems we had some internal uses that include ClangTidyTest.h and weren't ready for a gtest dependency. Reverting to give Manuel some time to look into it. llvm-svn: 244658
* 1. Disable tests that currently cannot work on windows due to missing path ↵Manuel Klimek2015-08-112-34/+54
| | | | | | | | canonicalization in the file manager. 2. Add better output when a clang-tidy unit test fails so it's clear what the error is. llvm-svn: 244602
* Also ClangTidyTests requires clangLex.NAKAMURA Takumi2015-08-111-0/+1
| | | | llvm-svn: 244599
* Fix strict dependency uncovered by windows bot.Manuel Klimek2015-08-111-0/+1
| | | | llvm-svn: 244598
* Do not use inheriting constructors.Manuel Klimek2015-08-111-3/+6
| | | | llvm-svn: 244597
* Default initialize from explicitly constructed object.Manuel Klimek2015-08-111-2/+3
| | | | llvm-svn: 244596
* Fix shadowing of type with variable.Manuel Klimek2015-08-111-4/+4
| | | | llvm-svn: 244587
* Add an IncludeInserter to clang-tidy.Manuel Klimek2015-08-118-1/+924
| | | | | | Will be used to allow checks to insert includes at the right position. llvm-svn: 244586
* misc-unused-parameters: Don't touch K&R style functions.Daniel Jasper2015-08-102-1/+15
| | | | | | We couldn't calculate the removal ranges properly at this point. llvm-svn: 244454
* Silence gcc 5.1 unused variable warnings using LLVM_ATTRIBUTE_UNUSED.Yaron Keren2015-08-071-4/+4
| | | | llvm-svn: 244329
* Correcting and adding tests for r244206.Aaron Ballman2015-08-061-1/+3
| | | | llvm-svn: 244208
* Add the "quit" command as a way to terminate clang-query interactive sessions.Aaron Ballman2015-08-065-2/+26
| | | | llvm-svn: 244206
* Update references to new lists.llvm.org mailing lists.Tanya Lattner2015-08-051-2/+2
| | | | llvm-svn: 244001
* [clang-tidy] Improve the misc-unused-alias-decl messageAlexander Kornienko2015-08-033-4/+5
| | | | | | "this namespace alias decl is unused" -> "namespace alias decl '...' is unused" llvm-svn: 243906
* Replace callback-if with isExpansionInMainFile as suggested in postDaniel Jasper2015-08-031-6/+4
| | | | | | commit review. llvm-svn: 243871
* Add missing 'override'.Daniel Jasper2015-07-311-1/+1
| | | | llvm-svn: 243773
* Add misc-unused-alias-decls check that currently finds unused namespaceDaniel Jasper2015-07-315-0/+115
| | | | | | | alias declarations. In the future, we might want to reuse it to also fine unsed using declarations and such. llvm-svn: 243754
* [clang-tidy] Support replacements in macro arguments in ↵Alexander Kornienko2015-07-312-11/+40
| | | | | | | | | | | | | | | | misc-inefficient-algorithm Summary: Support replacements in macro arguments in the misc-inefficient-algorithm check. Reviewers: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11677 llvm-svn: 243747
* Move an extra switch to ↵NAKAMURA Takumi2015-07-282-3/+2
| | | | | | | | clang-tools-extra/test/clang-tidy/misc-unused-parameters.cpp from check_clang_tidy.sh. It also rolls back r242984 and r242985. llvm-svn: 243491
* misc-unused-parameters: Only remove parameters in the main source file.Daniel Jasper2015-07-282-2/+10
| | | | | | | In headers, they might always be pulled in to different TUs, even if they are declared static or nested in an unnamed namespace. llvm-svn: 243414
* misc-unused-parameters: Properly handle static class members.Daniel Jasper2015-07-282-3/+10
| | | | | | Not sure why I wrote what I wrote before. llvm-svn: 243403
* [clang-tidy] Set current main file name in tests.Alexander Kornienko2015-07-271-0/+1
| | | | llvm-svn: 243272
* Trying again to a failing test the bots found with r243266.Aaron Ballman2015-07-271-3/+3
| | | | llvm-svn: 243269
* Fixing a failing test the bots found with r243266.Aaron Ballman2015-07-271-1/+1
| | | | llvm-svn: 243268
* misc-unused-parameters: Don't warn on ParmVarDecls in the return type.Daniel Jasper2015-07-273-16/+28
| | | | | | | | | As there don't seem to be a good way of formulating a matcher that finds all pairs of functions and their ParmVarDecls, just match on functionDecls and iterate over their parameters. This should also be more efficient as some checks are only performed once per function. llvm-svn: 243267
* Updating the documentation for clang-tidy. Removes some non-ASCII characters ↵Aaron Ballman2015-07-272-19/+19
| | | | | | from the documentation, and removes shell-specific single quote characters as they cause issues for some shells (such as on Windows). llvm-svn: 243266
* [clang-tidy] Don't duplicate the leading slash.Alexander Kornienko2015-07-271-1/+1
| | | | llvm-svn: 243265
* misc-unused-parameters: Fix bug where the check was looking atDaniel Jasper2015-07-232-2/+6
| | | | | | ParmVarDecls of function types. llvm-svn: 243026
* Fix the shell script check_clang_tidy.sh in r242984.NAKAMURA Takumi2015-07-231-2/+1
| | | | llvm-svn: 242985
* Appease test/clang-tidy/misc-unused-parameters.cpp for targeting *-win32, to ↵NAKAMURA Takumi2015-07-231-0/+2
| | | | | | | | | add -fno-delayed-template-parsing. Note, clang-tidy tests wouldn't run on Windows hosts since they are disabled with REQUIRES:shell. The failure would be raised with cross building. llvm-svn: 242984
* misc-unused-parameters: Fix handling of parameters in template functions.Daniel Jasper2015-07-222-2/+13
| | | | | | | | | | | | | The parameters of the function templates were being marked as incorrectly be marked as unused. Added a test for this and changed the check to use the same isReferenced() || !getDeclName() logic as Sema::DiagnoseUnusedParameters. Patch Scott Wallace, thank you! llvm-svn: 242912
* Extend misc-unused-parameters to delete parameters of local functions.Daniel Jasper2015-07-202-3/+134
| | | | | | Also see: llvm.org/PR24180. llvm-svn: 242659
* Initial version of clang-tidy check to find and fix unused parameters.Daniel Jasper2015-07-205-0/+100
| | | | | | Also see: llvm.org/PR24180. llvm-svn: 242654
* [clang-modernize] Don't rely on iterator auto-dereferencing.Benjamin Kramer2015-07-181-1/+1
| | | | llvm-svn: 242607
* docs/conf.py: bump version to 3.8Hans Wennborg2015-07-141-2/+2
| | | | llvm-svn: 242247
* Added mechanism to modularize for doing a compilation precheckJohn Thompson2015-07-1012-37/+403
| | | | | | | | | | | | to determine files that have comnpilation or dependency problems. A new -display-file-lists option use this to display lists of good files (no compile errors), problem files, and a combined list with problem files preceded by a '#'. The problem files list can be used in the module map generation assistant mode to exclude problem files. The combined files list can be used during module map development. See added docs. llvm-svn: 241880
* Fixed line-endings.John Thompson2015-07-082-40/+40
| | | | llvm-svn: 241744
* Fixed erroneous comments.John Thompson2015-07-081-5/+1
| | | | llvm-svn: 241726
* Fixed erroneous comment.John Thompson2015-07-081-1/+1
| | | | llvm-svn: 241724
* Revert r241330. It compiled with Visual C++ 2013 and gcc 4.9.1 (mingw) but ↵Yaron Keren2015-07-036-14/+17
| | | | | | now fails the bots. llvm-svn: 241335
* Replace some const std::string & with llvm::StringRef or std::stringYaron Keren2015-07-036-17/+14
| | | | | | | | and std::move to avoid implicit std::string construction. Patch by Eugene Kosov. llvm-svn: 241330
* [clang-tidy] Enhance clang-tidy misc-macro-repeated-side-effects...Daniel Marjamaki2015-07-022-31/+81
| | | | | | | | | | | Enhance clang-tidy misc-macro-repeated-side-effects to handle ? and : better. When ? is used in a macro, there are 2 possible control flow paths through the macro. These paths are tracked separately so problems can be detected properly. http://reviews.llvm.org/D10653 llvm-svn: 241245
* [clang-tidy] minor coding style tweak. make functions static.Daniel Marjamaki2015-07-011-5/+5
| | | | llvm-svn: 241160
* [clang-tidy] Enhance clang-tidy readability-simplify-boolean-expr...Alexander Kornienko2015-07-014-42/+630
| | | | | | | | | | | | | | | | | | | | Enhance clang-tidy readability-simplify-boolean-expr to handle 'if (e) return true; return false;' and improve replacement expressions. This changeset extends the simplify boolean expression check in clang-tidy to simplify if (e) return true; return false; to return e; (note the lack of an else clause on the if statement.) By default, chained conditional assignment is left unchanged, unless a configuration parameter is set to non-zero to override this behavior. It also improves the handling of replacement expressions to apply static_cast<bool>(expr) when expr is not of type bool. http://reviews.llvm.org/D9810 Patch by Richard Thomson! llvm-svn: 241155
* [clang-tidy] Fix false positives in the macro parentheses checkerDaniel Marjamaki2015-06-292-2/+14
| | | | | | | | | | | Summary: There were false positives in C++ code where macro argument was a type. Reviewers: alexfh Differential Revision: http://reviews.llvm.org/D10801 llvm-svn: 240938
* [clang-tidy] Fix false positives in misc-macro-parentheses checkerDaniel Marjamaki2015-06-232-3/+5
| | | | llvm-svn: 240399
* Update for LLVM API change to return by InputArgList directly (rather than ↵David Blaikie2015-06-221-3/+3
| | | | | | by pointer) from ParseArgs llvm-svn: 240348
OpenPOWER on IntegriCloud