summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra
Commit message (Collapse)AuthorAgeFilesLines
* Fixed a typo in a comment. NFC.Alexander Kornienko2014-12-191-1/+1
| | | | llvm-svn: 224581
* Update to match clang r223913.Richard Smith2014-12-101-1/+14
| | | | llvm-svn: 223914
* [clang-tidy] Fix a typo.Alexander Kornienko2014-12-091-2/+3
| | | | llvm-svn: 223777
* [clang-tidy] Extended the example check, added a fix-it, etc.Alexander Kornienko2014-12-091-12/+23
| | | | llvm-svn: 223771
* clang-tidy: Add a basic python script to generate checks.Daniel Jasper2014-12-091-0/+214
| | | | | | | | There are still a vast range of improvements that can be done to this, but it seems like an ok initial version. Suggestions or patches are highly welcome. llvm-svn: 223766
* Handle newlines on Windows correctly.Nikola Smiljanic2014-12-095-1/+26
| | | | llvm-svn: 223750
* [clang-tidy] google-runtime-int: Don't check C code.Alexander Kornienko2014-12-082-0/+31
| | | | llvm-svn: 223651
* [clang-tidy] Add clang-tidy check for unique_ptr's reset+release -> moveAlexander Kornienko2014-12-055-0/+156
| | | | | | | | | | | Replace x.reset(y.release()); with x = std::move(y); If y is rvalue, replace with x = y; instead. http://reviews.llvm.org/D6485 Patch by Alexey Sokolov! llvm-svn: 223460
* Make ArgumentsAdjuster an std::function (clang-tools-extra part of D6505).Alexander Kornienko2014-12-031-21/+13
| | | | | | | | | | | | Reviewers: klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6506 llvm-svn: 223249
* [clang-tidy] Update help messages and docs.Alexander Kornienko2014-12-032-63/+108
| | | | | | Fixed incorrect examples of configuration, clarified the usage of -dump-config. llvm-svn: 223235
* [clang-tidy] Make a test independent of the default check set.Alexander Kornienko2014-12-031-1/+1
| | | | llvm-svn: 223232
* Update and simplify to match Clang r223095.Richard Smith2014-12-021-14/+3
| | | | llvm-svn: 223098
* [clang-tidy] google-explicit-constructor: don't match in template instantiationsAlexander Kornienko2014-11-302-1/+20
| | | | | | | This helps avoiding false positives related to the recently added std::initializer_list<> handling. llvm-svn: 222981
* [clang-tidy] More tests for the google-explicit-constructor checkAlexander Kornienko2014-11-281-5/+26
| | | | llvm-svn: 222924
* [clang-tidy] Support initializer_list in google-explicit-constructor checkAlexander Kornienko2014-11-278-30/+117
| | | | | | | | | | | | | | | | | | | 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
* clang-tidy: [misc-use-override] Add testcase with reversed attribute orderDaniel Jasper2014-11-251-0/+5
| | | | llvm-svn: 222755
* clang-tidy: Add override before the first attribute.Daniel Jasper2014-11-252-9/+12
| | | | | | Apparently attributes aren't sorted by source location. llvm-svn: 222751
* [clang-tidy] Set google-readability-namespace-comments.ShortNamespaceLines to 10Alexander Kornienko2014-11-203-5/+19
| | | | | | This value is used in cpplint, so we'd better be consistent. llvm-svn: 222431
* [clang-tidy] Count errors in ClangTidyDiagnosticConsumerAlexander Kornienko2014-11-202-1/+4
| | | | | | | This re-applies r222363 reverted in r222390 after compilation errors in our out-of-tree clang-tidy tests were fixed. llvm-svn: 222427
* Revert r222363: "[clang-tidy] Count errors in ClangTidyDiagnosticConsumer"Hans Wennborg2014-11-192-4/+1
| | | | | | | This was causing clang-tidy invocations that would previously pass despite source errors to fail. llvm-svn: 222390
* [clang-tidy] Count errors in ClangTidyDiagnosticConsumerAlexander Kornienko2014-11-192-1/+4
| | | | llvm-svn: 222363
* Update for LLVM API change to make Small(Ptr)Set::insert return ↵David Blaikie2014-11-191-1/+1
| | | | | | pair<iterator, bool> as per the C++ standard's associative container concept. llvm-svn: 222336
* Remove uses of StringMap::GetOrCreateValue in favor of stl-compatible API usageDavid Blaikie2014-11-191-2/+2
| | | | llvm-svn: 222305
* Update for LLVM API changeDavid Blaikie2014-11-191-1/+1
| | | | llvm-svn: 222304
* [clang-tidy] Move the missing namespace comment warnings to the closing braceAlexander Kornienko2014-11-174-6/+15
| | | | | | | | | | | | | | | | | | | Summary: The google-readability-namespace-comments/llvm-namespace-comment warnings are quite confusing when they appear at the beginning of a long namespace and the closing brace is not in sight. For convenience added notes pointing to the start of the namespace. Reviewers: klimek Reviewed By: klimek Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D6251 llvm-svn: 222145
* Remove some redundant virtual on overridden functionsDavid Blaikie2014-11-142-4/+4
| | | | llvm-svn: 222027
* Regression test for the --serialize-diagnostics problem fixed in r221884.Alexander Kornienko2014-11-131-0/+3
| | | | llvm-svn: 221885
* [clang-tidy] google-readability-function: skip std::nullptr_tAlexander Kornienko2014-11-052-0/+10
| | | | | | | Parameters of type std::nullptr_t can only have one value, so it doesn't make sense to name them. llvm-svn: 221340
* [clang-tidy] Don't print a message if there's no error.Alexander Kornienko2014-11-041-2/+3
| | | | llvm-svn: 221272
* Use findProgramByName. NFC.Rafael Espindola2014-11-041-3/+4
| | | | llvm-svn: 221260
* [clang-tidy] Added -fix-errors optionAlexander Kornienko2014-11-032-4/+41
| | | | | | | | | | | | | | | | | | 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
* [CMake] clangApplyReplacement: Add clangAST in libdeps to appease msc builder.NAKAMURA Takumi2014-10-301-0/+1
| | | | | | | | clangApplyReplacements.lib(ApplyReplacements.cpp.obj) : error LNK2001: unresolved external symbol "private: void __thiscall clang::APValue::DestroyDataAndMakeUninit(void)" (?DestroyDataAndMakeUninit@APValue@clang@@AAEXXZ) They are not seen in mingw dll build. Investigating. llvm-svn: 220895
* [CMake] Prune redundant libdeps.NAKAMURA Takumi2014-10-305-8/+0
| | | | llvm-svn: 220893
* [CMake] Add dependencies on clangToolingCore.NAKAMURA Takumi2014-10-3010-0/+10
| | | | llvm-svn: 220890
* [CMake] Reformat.NAKAMURA Takumi2014-10-301-1/+2
| | | | llvm-svn: 220888
* Fix Makefiles after r220867.Daniel Jasper2014-10-2910-24/+30
| | | | 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
* Suppress clang-tools-extra/test/clang-tidy/file-filter.cpp on win32 for ↵NAKAMURA Takumi2014-10-291-0/+3
| | | | | | investigaitng. llvm-svn: 220837
* [clang-tidy] Updated docs for r220826.Alexander Kornienko2014-10-281-0/+1
| | | | llvm-svn: 220830
* [clang-tidy] Added -system-headers option.Alexander Kornienko2014-10-286-13/+41
| | | | | | | Added -system-headers option to allow display of warnings from system headers. This is needed for testing libcxx, for example. llvm-svn: 220826
* Prune CRLF.NAKAMURA Takumi2014-10-272-189/+189
| | | | llvm-svn: 220678
* [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.shAlexander Kornienko2014-10-2626-129/+139
| | | | | | | | | | | | | | Summary: Make the script suitable for checking just messages. Move most of the tests to use it. Clean up the tests: shorten messages, insert line numbers, remove unnecessary RUN: lines, etc. Reviewers: klimek Reviewed By: klimek Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D5989 llvm-svn: 220634
* [clang-tidy] Clean up test.Alexander Kornienko2014-10-261-7/+5
| | | | | | Simplify RUN lines and make checks stricter, check messages instead of fixes. llvm-svn: 220633
* [clang-tidy] Simplify RUN: lines in the testAlexander Kornienko2014-10-261-3/+1
| | | | llvm-svn: 220632
* [clang-tidy] Bring order to check registration.Alexander Kornienko2014-10-2621-29/+75
| | | | | | | | | | | | | | | | 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-235-5/+89
| | | | | | | | | | | | | | | 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
* [clang-tidy] Add support for custom configuration file names/formats.Alexander Kornienko2014-10-202-40/+111
| | | | | | | | | | | | | | Summary: We're using different clang-tidy frontends (command-line, batch analysis jobs, code review integration), some of which are limited in the choice of configuration format. In order to avoid duplication of configuration information, we need to support the same configuration format in the command-line tool. This patch adds an extension point to make this possible without rewriting FileOptionsProvider. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5821 llvm-svn: 220199
* [clang-tidy] Minor fixes for the NamespaceCommentCheck.Alexander Kornienko2014-10-162-4/+14
| | | | | | | | * Make SmallVector size enough for all groups. * Allow trailing period in the comment. * Fix "// anonymous namespace qqq". llvm-svn: 219926
* [clang-tidy] Default options in modules.Alexander Kornienko2014-10-167-11/+47
| | | | | | | | | | | | | | | | | | | | | | | 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
* Avoid having "using namespace" for both "clang" and "llvm" namespaces.Alexey Samsonov2014-10-151-20/+19
| | | | | | | This is fragile, as there are classes with the same name in both namespaces (e.g. llvm::Module and clang::Module). llvm-svn: 219855
OpenPOWER on IntegriCloud