| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: + manually convert the unit test to lit test.
Reviewers: hokein
Reviewed By: hokein
Subscribers: mgorny, xazax.hun, cfe-commits
Differential Revision: https://reviews.llvm.org/D40392
llvm-svn: 318926
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Rename misc-string-constructor to bugprone-string-constructor +
manually update the lenght of '==='s in the doc file.
Reviewers: hokein, xazax.hun
Reviewed By: hokein, xazax.hun
Subscribers: mgorny, xazax.hun, cfe-commits
Differential Revision: https://reviews.llvm.org/D40388
llvm-svn: 318916
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Redundant Expression Checker is updated to be able to detect expressions that
contain macros. Also, other small details are modified to improve the current
implementation.
The improvements in detail are as follows:
* Binary and ternary operator expressions containing two constants, with at
least one of them from a macro, are detected and tested for redundancy.
Macro expressions are treated somewhat differently from other expressions,
because the particular values of macros can vary across builds.
They can be considered correct and intentional, even if macro values equal,
produce ranges that exclude each other or fully overlap, etc.
* The code structure is slightly modified: typos are corrected,
comments are added and some functions are renamed to improve comprehensibility,
both in the checker and the test file. A few test cases are moved to another
function.
* The checker is now able to detect redundant CXXFunctionalCastExprs as well.
A corresponding test case is added.
Patch by: Lilla Barancsuk!
Differential Revision: https://reviews.llvm.org/D38688
llvm-svn: 317570
|
|
|
|
|
|
| |
DenseMap performs better here. No functionality change intended.
llvm-svn: 315277
|
|
|
|
| |
llvm-svn: 314047
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Bug: https://bugs.llvm.org/show_bug.cgi?id=34449
**Problem:**
Clang-tidy check misc-unused-parameters comments out parameter name omitting following characters (e.g. square brackets) what results in its complete removal. Compilation errors might occur after clang-tidy fix as well.
**Patch description:**
Changed removal range. The range should end after parameter name, not after whole parameter declarator (which might be followed by e.g. square brackets).
Reviewers: alexfh
Reviewed By: alexfh
Subscribers: JDevlieghere, xazax.hun, cfe-commits
Tags: #clang-tools-extra
Patch by Pawel Maciocha!
Differential Revision: https://reviews.llvm.org/D37846
llvm-svn: 313355
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Bug: https://bugs.llvm.org/show_bug.cgi?id=34450
**Problem:**
Clang-tidy check misc-unused-parameters omits parameter default value what results in its complete removal. Compilation errors might occur after clang-tidy fix.
**Patch description:**
Changed removal range. The range should end after parameter declarator, not after whole parameter declaration (which might contain a default value).
Reviewers: alexfh, xazax.hun
Reviewed By: alexfh
Subscribers: JDevlieghere, cfe-commits
Tags: #clang-tools-extra
Patch by Pawel Maciocha!
Differential Revision: https://reviews.llvm.org/D37566
llvm-svn: 313150
|
|
|
|
|
|
|
|
|
|
|
| |
iThere is a reported bug on the checker not handling the some APSInt values
correctly: https://bugs.llvm.org/show_bug.cgi?id=34400
This patch aims to fix it.
Differential Revision: https://reviews.llvm.org/D37572
llvm-svn: 313016
|
|
|
|
|
|
|
|
| |
Reviewers: alexfh, xazax.hun, danielmarjamaki
Differential Revision: http://reviews.llvm.org/D36670
llvm-svn: 311984
|
|
|
|
|
|
| |
No functional change intended.
llvm-svn: 310532
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D36154
llvm-svn: 309810
|
|
|
|
| |
llvm-svn: 308605
|
|
|
|
|
|
|
|
|
|
| |
to Parameters (as opposed to Arguments).
This syncs them up with clang commit r308190
Thanks!
llvm-svn: 308191
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D34449
llvm-svn: 306538
|
|
|
|
|
|
|
|
|
|
| |
to be suppressed."
This reverts commit r304949.
https://reviews.llvm.org/D34002#775830
llvm-svn: 305057
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
suppressed.
Summary: "misc-noexcept-move-constructor" is better not to be issued when "-fno-exceptions" is set.
Reviewers: chh, alexfh, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: aaron.ballman, cfe-commits, xazax.hun
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D34002
llvm-svn: 304949
|
|
|
|
|
|
|
|
| |
The check failed to match iterator->const_iterator conversion that is happening
at least when using the libstdc++'s vector. We might want to make it match even
more flexible patterns, if we see more false negatives.
llvm-svn: 304879
|
|
|
|
|
|
| |
+ replace matchesName calls with more efficient alternatives.
llvm-svn: 304811
|
|
|
|
|
|
|
|
| |
Added negated string literals to the set of IsAlwaysFalse expressions to avoid flagging of assert(!"msg").
Differential Revision: http://reviews.llvm.org/D33827
llvm-svn: 304657
|
|
|
|
| |
llvm-svn: 304583
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a clang-tidy check for using func__/FUNCTION__ inside lambdas. This
evaluates to the string operator(), which is almost never useful and almost
certainly not what the author intended.
Patch by Bryce Liu!
Differential Revision: https://reviews.llvm.org/D33497
llvm-svn: 304570
|
|
|
|
| |
llvm-svn: 304154
|
|
|
|
|
|
|
|
|
| |
Check BaseType before dereference.
Simplified test case is derived from Android Open Source code.
Differential Revision: https://reviews.llvm.org/D33430
llvm-svn: 303645
|
|
|
|
| |
llvm-svn: 303554
|
|
|
|
|
|
|
|
|
| |
Don't traverse AST each time we need to find references to a certain function.
Traverse the AST once using RAV and cache the index of function references.
The speed up on a particular large file was about 1000x.
llvm-svn: 303230
|
|
|
|
| |
llvm-svn: 302534
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Fix misc-move-const-arg false positives on move-only types.
Reviewers: sbenza
Reviewed By: sbenza
Subscribers: xazax.hun, cfe-commits
Differential Revision: https://reviews.llvm.org/D31160
llvm-svn: 302261
|
|
|
|
|
|
|
|
|
|
| |
widening casts by default.
Patch by Ádám Balogh!
Differential Revision: https://reviews.llvm.org/D32164
llvm-svn: 300699
|
|
|
|
| |
llvm-svn: 300324
|
|
|
|
|
|
|
|
|
| |
* Style fixes to tests
* Make it work consistently on all platforms
Patch by András Leitereg!
llvm-svn: 300320
|
|
|
|
|
|
|
|
| |
Patch by András Leitereg!
Differential Revision: https://reviews.llvm.org/D30547
llvm-svn: 299638
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
```
catch (std::exception ex)
{
}
```
Was flagged with "catch handler catches a pointer value".
Reviewers: alexfh, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: cfe-commits, JDevlieghere
Patch by Florian Gross!
Differential Revision: https://reviews.llvm.org/D30592
llvm-svn: 298608
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Catch trivially true statements of the form a != 1 || a != 3. Statements like
these are likely errors. They are particularly easy to miss when handling enums:
enum State {
RUNNING,
STOPPED,
STARTING,
ENDING
}
...
if (state != RUNNING || state != STARTING)
...
Patch by Blaise Watson!
Differential revision: https://reviews.llvm.org/D29858
llvm-svn: 298607
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
defaulted declarations
Summary:
There is no need for triggering warning when noexcept specifier in move constructor or move-assignment operator is neither evaluated nor uninstantiated.
This fixes bug reported here: bugs.llvm.org/show_bug.cgi?id=24712
Reviewers: alexfh
Reviewed By: alexfh
Subscribers: JonasToth, JDevlieghere, cfe-commits
Tags: #clang-tools-extra
Patch by Marek Jenda!
Differential Revision: https://reviews.llvm.org/D31049
llvm-svn: 298101
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
I've added a test case that (without the fix) triggers the assertion,
which happens when a move happens in an implicitly called conversion
operator.
This patch also fixes nondeterministic behavior in the source code
location reported for the move when the move is constained in an init list;
this was causing buildbot failures in the previous attempt to submit
this patch (see D30569 and rL297004).
Reviewers: alexfh
Reviewed By: alexfh
Subscribers: Eugene.Zelenko, JDevlieghere, cfe-commits
Differential Revision: https://reviews.llvm.org/D30650
llvm-svn: 297272
|
|
|
|
|
|
| |
This reverts commit r297004; it was causing buildbots to fail.
llvm-svn: 297006
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
I've added a test case that (without the fix) triggers the assertion,
which happens when a move happens in an implicitly called conversion
operator.
Reviewers: alexfh
Reviewed By: alexfh
Subscribers: JDevlieghere, cfe-commits
Differential Revision: https://reviews.llvm.org/D30569
llvm-svn: 297004
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
classes in misc-definitions-in-headers.
Reviewers: alexfh
Reviewed By: alexfh
Subscribers: JDevlieghere, cfe-commits
Differential Revision: https://reviews.llvm.org/D29957
llvm-svn: 295178
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The misc-unconventional-assign-operator check had a false positive
warning when the 'operator*' in 'return *this' was unresolved.
Change matcher to allow calls to unresolved operator.
Fixes PR31531.
Reviewers: alexfh, aaron.ballman
Subscribers: JDevlieghere, cfe-commits
Differential Revision: https://reviews.llvm.org/D29393
llvm-svn: 295176
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Users might get confused easily when they see the check's message on
full template function speciliations.
Add a note to the output message, which mentions these kind of function
specializations are treated as regular functions.
Reviewers: alexfh
Reviewed By: alexfh
Subscribers: JDevlieghere, cfe-commits
Differential Revision: https://reviews.llvm.org/D29928
llvm-svn: 295048
|
|
|
|
|
|
| |
compile errors
llvm-svn: 294578
|
|
|
|
|
|
|
| |
hasErrorOccurred() -> hasUncompilableErrorOccurred(), since we only care about
errors that lead to invalid AST.
llvm-svn: 294467
|
|
|
|
|
|
|
|
| |
Patch by CJ DiMeglio!
Differential revision: https://reviews.llvm.org/D28973
llvm-svn: 294459
|
|
|
|
|
|
|
| |
It looks like direct calls to mocked methods happen in the wild. This patch
add support for these as well.
llvm-svn: 294293
|
|
|
|
|
|
|
|
| |
Now for real. The use case supported previously is used by approximately nobody.
What's needed is support for matching argument comments in EXPECT_xxx calls to
the names of parameters of the mocked methods.
llvm-svn: 294193
|
|
|
|
| |
llvm-svn: 294192
|
|
|
|
| |
llvm-svn: 293845
|
|
|
|
| |
llvm-svn: 293771
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I have a created a new check for clang tidy: misc-string-compare. This will check for incorrect usage of std::string::compare when used to check equality or inequality of string instead of the string equality or inequality operators.
Example:
```
std::string str1, str2;
if (str1.compare(str2)) {
}
```
Reviewers: hokein, aaron.ballman, alexfh, malcolm.parsons
Subscribers: xazax.hun, Eugene.Zelenko, cfe-commits, malcolm.parsons, Prazek, mgorny, JDevlieghere
Differential Revision: https://reviews.llvm.org/D27210
llvm-svn: 290747
|
|
|
|
|
|
|
|
|
|
|
| |
The checker detects various cases when an enum is probably misused
(as a bitmask).
Patch by: Peter Szecsi!
Differential Revision: https://reviews.llvm.org/D22507
llvm-svn: 290600
|