| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
Initialize CommonOptionsParser with ZeroOrOne NumOccurrenceFlag so callers can
pass -list-checks without the need to pass additional positional parameters,
then add dummy file if none were supplied.
http://reviews.llvm.org/D12070
Patch by Don Hinton!
llvm-svn: 245205
|
|
|
|
| |
llvm-svn: 245144
|
|
|
|
|
|
|
| |
This is better structurally and it also fixes a linker error in the configure
build.
llvm-svn: 245052
|
|
|
|
|
|
| |
can leave out the parameter list.
llvm-svn: 245048
|
|
|
|
|
|
|
|
|
|
| |
This is the first step for migrating cppmodernize to clang-tidy.
http://reviews.llvm.org/D11946
Patch by Angel Garcia!
llvm-svn: 245045
|
|
|
|
|
|
|
|
|
|
|
| |
If there weren't any includes in the file, or all of them had 'IncludeKind'
greater than the desired one, then 'CreateIncludeInsertion' didn't work.
http://reviews.llvm.org/D12017
Patch by Angel Garcia!
llvm-svn: 245042
|
|
|
|
|
|
| |
easier
llvm-svn: 244793
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 244598
|
|
|
|
| |
llvm-svn: 244587
|
|
|
|
|
|
| |
Will be used to allow checks to insert includes at the right position.
llvm-svn: 244586
|
|
|
|
|
|
| |
We couldn't calculate the removal ranges properly at this point.
llvm-svn: 244454
|
|
|
|
| |
llvm-svn: 244329
|
|
|
|
|
|
| |
"this namespace alias decl is unused" -> "namespace alias decl '...' is unused"
llvm-svn: 243906
|
|
|
|
|
|
| |
commit review.
llvm-svn: 243871
|
|
|
|
| |
llvm-svn: 243773
|
|
|
|
|
|
|
| |
alias declarations. In the future, we might want to reuse it to also
fine unsed using declarations and such.
llvm-svn: 243754
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Not sure why I wrote what I wrote before.
llvm-svn: 243403
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
from the documentation, and removes shell-specific single quote characters as they cause issues for some shells (such as on Windows).
llvm-svn: 243266
|
|
|
|
| |
llvm-svn: 243265
|
|
|
|
|
|
| |
ParmVarDecls of function types.
llvm-svn: 243026
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Also see: llvm.org/PR24180.
llvm-svn: 242659
|
|
|
|
|
|
| |
Also see: llvm.org/PR24180.
llvm-svn: 242654
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 241160
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 240399
|
|
|
|
|
|
| |
Clang was warning on this.
llvm-svn: 239988
|
|
|
|
|
|
| |
repeated in the macro
llvm-svn: 239909
|
|
|
|
|
|
| |
violations.
llvm-svn: 239904
|
|
|
|
|
|
|
| |
* calculations in the replacement list should be inside parentheses
* macro arguments should be inside parentheses
llvm-svn: 239820
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Force braces around leaf 'else if' for consistency.
This complements r233697.
Reviewers: alexfh
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D10245
llvm-svn: 239054
|
|
|
|
|
|
| |
misc-static-assert and misc-assert-side-effect will handle __builtin_expect based asserts correctly.
llvm-svn: 238548
|
|
|
|
| |
llvm-svn: 238326
|
|
|
|
|
|
| |
and assignments.
llvm-svn: 238202
|
|
|
|
|
|
|
|
|
| |
files included in other files.
This is done sometimes for testing purposes, and the check needs to handle this
consistently.
llvm-svn: 238193
|
|
|
|
|
|
| |
misc-static-assert won't report asserts whose conditions contain calls to non constexpr functions.
llvm-svn: 238098
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add a clang-tidy check (misc-noexcept-move-ctors) for move constructors
and assignment operators not using noexcept.
http://llvm.org/PR23519
Reviewers: klimek
Reviewed By: klimek
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D9933
llvm-svn: 238013
|
|
|
|
|
|
|
|
|
| |
Some people have reasons to compile their .c files as C++ in some configurations
(e.g. for testing purposes), so just looking at LangOptions is not enough. This
patch disables the check on all .c files (and also for the headers included from
.c files).
llvm-svn: 237905
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enhance clang-tidy readability-simplify-boolean-expr check to handle chained
conditional assignment and chained conditional return.
Based on feedback from applying this tool to the clang/LLVM codebase, this
changeset improves the readability-simplify-boolean-expr check so that
conditional assignment or return statements at the end of a chain of if/else if
statements are left unchanged unless a configuration option is supplied.
http://reviews.llvm.org/D8996
Patch by Richard Thomson!
llvm-svn: 237541
|
|
|
|
|
|
|
| |
This solves some false negatives at a cost of adding some false positives that
can be fixed easily and (almost) automatically.
llvm-svn: 237120
|
|
|
|
|
|
|
|
|
|
| |
The misc-static-assert check will not warn on the followings:
assert(NULL == "shouldn't warn");
assert(__null == "shouldn't warn");
Where NULL is a macro defined as __null.
llvm-svn: 236812
|
|
|
|
| |
llvm-svn: 236405
|
|
|
|
|
|
|
| |
might be a little too strict now, but better be too strict than do the
wrong thing.
llvm-svn: 235932
|
|
|
|
|
|
|
|
| |
The number of strings is so small that performance doesn't matter and adding
the thread safe static initialization and destruction overhead is just not
worth it. No functional change intended.
llvm-svn: 235192
|