| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
No functional changes.
llvm-svn: 218772
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Convert c-style casts between integral end enum types to static_cast<>.
Reviewers: klimek
Reviewed By: klimek
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D5558
llvm-svn: 218760
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
testing::Unused parameters.
Reviewers: bkramer, klimek
Reviewed By: klimek
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D5479
llvm-svn: 218443
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
compare.
While there fix the cmake shared build.
llvm-svn: 218274
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This uses a bit hacky way to set the defaults for the spaces before
comments, but it's also one of the simplest ways. Fixed a bug with how the
SpacesBeforeComments option was used.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5410
llvm-svn: 218240
|
|
|
|
|
|
| |
leave the "redundant cast to the same type" part).
llvm-svn: 218225
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
addCheckFactory: registerCheck.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5288
llvm-svn: 217489
|
|
|
|
| |
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: 215799
|
|
|
|
|
|
| |
Turns out there is a better way to do this. No functionality change.
llvm-svn: 214874
|
|
|
|
| |
llvm-svn: 214703
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
definition is visible.
Summary:
This allows us to copy the parameter name from the definition (as a comment)
or insert /*unused*/ in both places.
Reviewers: alexfh, klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4772
llvm-svn: 214701
|
|
|
|
|
|
|
|
|
| |
has a explicit template argument.
This required a rather ugly workaround for a problem in ASTMatchers where
callee() is only overloaded for Stmt and Decl but not for Expr.
llvm-svn: 213509
|
|
|
|
|
|
| |
dependent values.
llvm-svn: 213238
|
|
|
|
| |
llvm-svn: 213233
|
|
|
|
|
|
|
|
|
| |
negative-sized memsets.
memset(x, -1, 0) is still useless but swapping makes no sense here. Just emit
a warning.
llvm-svn: 213157
|
|
|
|
|
|
|
| |
It doesn't make sense to suggest swapping the arguments here but it's
still useless code
llvm-svn: 213156
|
|
|
|
|
|
|
|
|
|
|
|
| |
If there's memset(x, y, 0) in the code it's most likely a mistake. The
checker suggests a fix-it to swap 'y' and '0'.
I think this has the potential to be promoted into a general clang warning
after some testing in clang-tidy.
Differential Revision: http://reviews.llvm.org/D4535
llvm-svn: 213155
|
|
|
|
|
|
|
|
|
|
| |
This change contains of two checkers that warn about
1. anonymous namespaces in header files.
2. 'using namespace' directives everywhere.
Differential Revision: http://reviews.llvm.org/D4523
llvm-svn: 213153
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bkramer
Reviewed By: bkramer
Subscribers: cfe-commits, sbenza
Differential Revision: http://reviews.llvm.org/D4534
llvm-svn: 213149
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Those are considered unsafe and should be replaced with simple pointers or
full copies. It recognizes both std::string and ::string.
Reviewers: alexfh, djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4522
llvm-svn: 213133
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We still allow the escape hatch foo(int /*x*/) and also suggest this
in a fixit. This is more powerful than the corresponding cpplint.py check
it also flags functions with multiple arguments as naming all arguments is
recommended by the google style guide.
Reviewers: alexfh, djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4518
llvm-svn: 213075
|
|
|
|
|
|
|
|
|
|
| |
operator&
This handles both methods and freestanding overloads.
Differential Revision: http://reviews.llvm.org/D4498
llvm-svn: 213067
|
|
|
|
|
|
|
|
|
|
|
| |
Those may be incompatible with C++11 and are unnecessary. We suggest
removing the template arguments when they match the types of the make_pair
arguments or replace it with std::pair and explicit template arguments when
not.
Differential Revision: http://reviews.llvm.org/D4497
llvm-svn: 213058
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch implements a subset of possible replacements of C-style
casts with const_cast/static_cast/reinterpret_cast. This should cover a large
portion of cases in real code. Handling of a few more cases may be implemented
eventually.
Reviewers: sbenza, djasper
Reviewed By: djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4478
llvm-svn: 212924
|
|
|
|
| |
llvm-svn: 212920
|
|
|
|
| |
llvm-svn: 212033
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The first version failed the SubstNonTypeTempateParmExpr-related test
on some buildbots. This one uses the new substNonTypeTempateParmExpr matcher to
filter out implicit C-style casts.
This patch depends on D4327.
Reviewers: djasper
Reviewed By: djasper
Subscribers: aemerson, cfe-commits
Differential Revision: http://reviews.llvm.org/D4328
llvm-svn: 212002
|
|
|
|
|
|
| |
http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/13505/steps/check-all/logs/Clang%20Tools%3A%3Ac-style-casts.cpp
llvm-svn: 211708
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add a check to flag the usage of C-style casts, as per Google Style
Guide:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Casting#Casting
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4189
llvm-svn: 211702
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: No functional changes.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4188
llvm-svn: 211154
|
|
|
|
| |
llvm-svn: 209062
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
defined in a macro.
Summary:
We shouldn't suggest replacements in macros anyway, as we can't see all
usages of the macro and ensure the replacement is safe for all of them.
Reviewers: klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3611
llvm-svn: 207987
|
|
|
|
|
|
| |
Make the tests for removal of 'explicit' more diverse.
llvm-svn: 207534
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The Google C++ Style Guide doesn't require copy constructors to be
declared explicit, but some people do this by mistake. Make this check detect
and fix such cases.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3541
llvm-svn: 207531
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Explicit_Constructors
"The exception is copy constructors, which, in the rare cases when we allow
them, should probably not be explicit."
Reviewers: klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3122
llvm-svn: 204322
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3116
llvm-svn: 204226
|
|
|
|
| |
llvm-svn: 202969
|
|
|
|
| |
llvm-svn: 202632
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2894
llvm-svn: 202392
|