| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Note that this code is still grossly under-tested - the next steps will
be to add significantly better test coverage.
Patch by Matthew Plant.
Test Plan:
Reviewers:
Subscribers:
llvm-svn: 215839
|
|
|
|
| |
llvm-svn: 215799
|
|
|
|
|
| |
FIXME: It seems this might be incompatible to dos path. Investigating.
llvm-svn: 215590
|
|
|
|
| |
llvm-svn: 215589
|
|
|
|
|
|
| |
this behavior can still be observed today.
llvm-svn: 215553
|
|
|
|
| |
llvm-svn: 215550
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation is split into a generic part and a LLVM-specific part.
Other codebases can implement it with their own style. The specific features
supported are:
- Verification (and fixing) of header guards against a style based on the file path
- Automatic insertion of header guards for headers that are missing them
- A warning when the header guard doesn't enable our fancy header guard optimization
(e.g. when there's an include preceeding the guard)
- Automatic insertion of a comment with the guard name after #endif.
For the LLVM style we disable #endif comments for now, they're not very common
in the codebase. We also only flag headers in the include directories, there
doesn't seem to be a common style outside.
Differential Revision: http://reviews.llvm.org/D4867
llvm-svn: 215548
|