| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Preprocessor:addCommentHandler() does not take ownership,
so we'd end up leaking the TodoCommentHandler.
This patch makes it owned by the Check object.
Differential Revision: http://reviews.llvm.org/D5402
llvm-svn: 218068
|
| |
|
|
|
|
|
|
|
| |
It also suggests a fix-it, taking the name from $USER. This will be made
configurable eventually.
Differential Revision: http://reviews.llvm.org/D5393
llvm-svn: 218049
|
| |
|
|
|
|
| |
NFC
llvm-svn: 217952
|
| |
|
|
|
|
|
|
|
|
| |
If we had many header files we would attach the fix-it for all files to all
warnings, oops. This is harmless 99.9% of the time but can confuse the rewriter
in some edge cases. Sadly I failed to create a small test case for this.
While there move fix-its instead of copying.
llvm-svn: 217951
|
| |
|
|
|
|
| |
NFC
llvm-svn: 217947
|
| |
|
|
|
|
|
|
|
| |
warning.
Before we would emit two warnings if the header guard was wrong and the comment
on a trailing #endif also needed fixing.
llvm-svn: 217890
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As this is very dependent on the code base it has some ways of configuration.
It's possible to pick between 3 modes of operation:
- Line counting: number of lines including whitespace and comments
- Statement counting: number of statements within compoundStmts.
- Branch counter
In addition a threshold can be picked, warnings are only emitted when it is met.
The thresholds can be configured via a .clang-tidy file.
Differential Revision: http://reviews.llvm.org/D4986
llvm-svn: 217768
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 217493
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5289
llvm-svn: 217492
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
addCheckFactory: registerCheck.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5288
llvm-svn: 217489
|
| |
|
|
|
|
|
|
| |
newlines involved.
Getting that right is just not worth it.
llvm-svn: 217480
|
| |
|
|
| |
llvm-svn: 217475
|
| |
|
|
|
|
| |
No functionality change.
llvm-svn: 217442
|
| |
|
|
|
|
|
|
| |
Bucket replacements by FileEntry instead of path. The same file with
different paths is very common, relative #include paths and symlinks can
easily create them. When that occurs we would apply the fix twice.
llvm-svn: 217440
|
| |
|
|
| |
llvm-svn: 217377
|
| |
|
|
|
|
| |
when it's not around.
llvm-svn: 217374
|
| |
|
|
|
|
| |
Happy tidying.
llvm-svn: 217373
|
| |
|
|
| |
llvm-svn: 217369
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was failing with:
C:\bb-win7\ninja-clang-i686-msc17-R\llvm-project\llvm\include\llvm/Support/ErrorOr.h(102) : error C3861: 'make_error_code': identifier not found
C:\bb-win7\ninja-clang-i686-msc17-R\llvm-project\clang-tools-extra\clang-tidy\ClangTidyOptions.cpp(153) : see reference to function template instantiation 'llvm::ErrorOr<T>::ErrorOr<std::errc::errc>(E,void *)' being compiled
with
[
T=clang::tidy::ClangTidyOptions,
E=std::errc::errc
]
llvm-svn: 217201
|
| |
|
|
| |
llvm-svn: 217163
|
| |
|
|
|
|
| |
MatchFinder.addMatcher doesn't take ownership.
llvm-svn: 217162
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
Allows gathering fixes and applying them with clang-apply-fixes.
Differential Revision: http://reviews.llvm.org/D5176
llvm-svn: 217139
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parameter packs.
Summary:
This disables this check for std::bind and similar functions that use
parameter packs to forward arguments to a different function. Name of the
parameter pack argument doesn't matter.
Reviewers: klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5168
llvm-svn: 217039
|
| |
|
|
| |
llvm-svn: 217036
|
| |
|
|
|
|
|
|
| |
of copying it everywhere.
No intended functionality change.
llvm-svn: 217035
|
| |
|
|
| |
llvm-svn: 216901
|
| |
|
|
|
|
| |
overload.
llvm-svn: 216868
|
| |
|
|
| |
llvm-svn: 216727
|
| |
|
|
|
|
|
|
| |
fixed-size types.
Differential Revision: http://reviews.llvm.org/D5119
llvm-svn: 216726
|
| |
|
|
|
|
| |
functions.
llvm-svn: 216718
|
| |
|
|
| |
llvm-svn: 216711
|
| |
|
|
| |
llvm-svn: 216615
|
| |
|
|
| |
llvm-svn: 216584
|
| |
|
|
| |
llvm-svn: 216551
|
| |
|
|
| |
llvm-svn: 216529
|
| |
|
|
|
|
|
|
|
| |
we can also fix the original header guard.
We still allow an _ at the end of a header guard since it's so common, but
remove it now when the #endif comment is changed.
llvm-svn: 216462
|
| |
|
|
| |
llvm-svn: 216396
|
| |
|
|
|
|
| |
Turning block comments into line comments just creates unecessary churn.
llvm-svn: 216072
|
| |
|
|
|
|
| |
Make tests not depend on grep supporting -bo.
llvm-svn: 216041
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The commit broke public build bots for more than 24 hours.
(view as text)
******************** TEST 'Clang Tools :: clang-rename/VarTest.cpp' FAILED ********************
Script:
--
cat /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang.src/tools/extra/test/clang-rename/VarTest.cpp > /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp
clang-rename -offset=$(grep -FUbo 'foo;' /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp | head -1 | cut -d: -f1) -new-name=hector /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp -i --
sed 's,//.*,,' /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp | FileCheck /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang.src/tools/extra/test/clang-rename/VarTest.cpp
--
Exit Code: 1
Command Output (stderr):
--
clang-rename: could not find symbol at /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp:2:1 (offset 14).
llvm-svn: 215947
|
| |
|
|
| |
llvm-svn: 215935
|
| |
|
|
| |
llvm-svn: 215934
|
| |
|
|
|
|
| |
ClangRenameTests/USRLocFinding.FindsVarUSR on msc17 for now. Will fix later."
llvm-svn: 215859
|
| |
|
|
| |
llvm-svn: 215857
|
| |
|
|
|
|
| |
fix later.
llvm-svn: 215854
|
| |
|
|
| |
llvm-svn: 215843
|
| |
|
|
| |
llvm-svn: 215840
|