| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 300324
|
|
|
|
|
|
|
|
|
| |
* Style fixes to tests
* Make it work consistently on all platforms
Patch by András Leitereg!
llvm-svn: 300320
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the ClangTidyMain.cpp fails to link against shared LLVM/Clang libraries
due to the missing symbol:
clang::tooling::operator<(clang::tooling::Replacement const&,
clang::tooling::Replacement const&);
This patch fixes the issue by correctly linking clangToolingCore which contains
the definition.
llvm-svn: 300115
|
|
|
|
|
|
|
|
|
|
|
|
| |
One FileID per warning will increase and overflow NextLocalOffset
when input file is large with many warnings.
Reusing FileID avoids this problem.
This requires changes in getColumnNumber, D31406, rL299681.
Differential Revision: http://reviews.llvm.org/D31406
llvm-svn: 299700
|
|
|
|
| |
llvm-svn: 299651
|
|
|
|
| |
llvm-svn: 299649
|
|
|
|
|
|
|
|
| |
Patch by András Leitereg!
Differential Revision: https://reviews.llvm.org/D30547
llvm-svn: 299638
|
|
|
|
|
|
|
|
|
|
|
| |
- removed unnessacary namespaces
- added option to print warning in macros
- no fix for typedef with array
- removed "void" word from functions with 0 parameters
Differential Revision: https://reviews.llvm.org/D29262
llvm-svn: 299340
|
|
|
|
|
|
|
|
|
| |
Somehow the change failed test clang-tidy/llvm-include-order.cpp
on Windows platform.
Differential Revision: http://reviews.llvm.org/D31406
llvm-svn: 299146
|
|
|
|
|
|
|
|
|
|
| |
One FileID per warning will increase and overflow NextLocalOffset
when input file is large with many warnings.
Reusing FileID avoids this problem.
Differential Revision: http://reviews.llvm.org/D31406
llvm-svn: 299119
|
|
|
|
|
|
| |
Based on corrections mentioned in patch for clang for PR27635
llvm-svn: 299074
|
|
|
|
|
|
| |
Speculative fix for linker errors in r299068.
llvm-svn: 299070
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add some hicpp checks that can be implmented as alises for existing clang-tidy checks:
hicpp-explicit-conversions
hicpp-function-size
hicpp-named-parameter
hicpp-invalid-access-moved
hicpp-member-init
hicpp-new-delete-operators
hicpp-noexcept-move
hicpp-special-member-functions
hicpp-undelegated-constructor
hicpp-use-equals-default
hicpp-use-equals-delete
hicpp-use-override
Reviewers: dberlin, jbcoe, aaron.ballman, alexfh
Reviewed By: aaron.ballman
Subscribers: JDevlieghere
Differential Revision: https://reviews.llvm.org/D30383
Patch By: Jonas Toth
llvm-svn: 299068
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This furtherly improves r295303: [clang-tidy] Ignore spaces between globs in the Checks option.
Trims all whitespaces and not only spaces and correctly computes the offset of the checks list (taking the size before trimming).
Reviewers: alexfh
Reviewed By: alexfh
Subscribers: cfe-commits, JDevlieghere
Differential Revision: https://reviews.llvm.org/D30567
llvm-svn: 298621
|
|
|
|
|
|
| |
Fixes https://bugs.llvm.org/show_bug.cgi?id=27641.
llvm-svn: 298619
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 298500
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
case style
Summary:
Using CaseType::CT_AnyCase for selected identifier results in inheriting case style setting from more basic identifier type.
This patch changes CT_AnyCase behavior to ignore case style of specified identifier. If case style was not set, llvm::Optional will be used for keeping this information (llvm::Optional<>::hasVal), thus CT_AnyCase will no longer mean more general identifier style should be used.
This eliminates false-positives when naming convention is not clear for specific areas of code (legacy, third party) or for selected types.
Reviewers: berenm, alexfh
Reviewed By: alexfh
Subscribers: cfe-commits, JDevlieghere
Differential Revision: https://reviews.llvm.org/D30931
llvm-svn: 298499
|
|
|
|
|
|
| |
and some other post-commit review feedback.
llvm-svn: 298470
|
|
|
|
|
|
| |
No functionality change intended.
llvm-svn: 298442
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ADL as reasonable extension points.
All of this would be cleaner if this code followed the more usual LLVM
convention of not having deeply nested namespaces inside of .cpp files
and instead having a `using namespace ...;` at the top. Then the static
function would be in the global namespace and easily referred to as
`::join`. Instead we have to write a fairly contrived qualified name.
I figure the authors can clean this up with a less ambiguous name, using
the newly provided LLVM `join` function, or any other solution, but this
at least fixes the build.
llvm-svn: 298434
|
|
|
|
|
|
|
|
| |
array to pointer decay stemming from system macros.
Patch by Breno Rodrigues Guimaraes.
llvm-svn: 298421
|
|
|
|
| |
llvm-svn: 298316
|
|
|
|
| |
llvm-svn: 298315
|
|
|
|
|
|
|
|
| |
coding standard from PRQA.
This commit renames all of the safety functionality to be hicpp, adds an appropriate LICENSE.TXT, and updates the documentation accordingly.
llvm-svn: 298229
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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:
Fixed erroneously flagging of chained if statements when styled like this:
```
if (cond) {
}
else if (cond) {
}
else {
}
```
Reviewers: xazax.hun, alexfh
Reviewed By: xazax.hun, alexfh
Subscribers: JDevlieghere, cfe-commits
Patch by Florian Gross!
Differential Revision: https://reviews.llvm.org/D30841
llvm-svn: 298059
|
|
|
|
| |
llvm-svn: 298057
|
|
|
|
|
|
| |
This fixes http://llvm.org/PR32221.
llvm-svn: 298052
|
|
|
|
|
|
|
|
| |
the cppcoreguidelines-special-member-functions check.
Patch by Florian Gross.
llvm-svn: 297671
|
|
|
|
| |
llvm-svn: 297311
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: alexfh
Reviewed By: alexfh
Subscribers: xazax.hun, malcolm.parsons, JDevlieghere, cfe-commits
Differential Revision: https://reviews.llvm.org/D30639
llvm-svn: 297009
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add -format option (disabled by default for now) to trigger formatting
of replacements.
Reviewers: ioeric
Reviewed By: ioeric
Subscribers: kimgr, malcolm.parsons, JDevlieghere, cfe-commits
Differential Revision: https://reviews.llvm.org/D30564
llvm-svn: 296864
|
|
|
|
|
|
| |
for const types
llvm-svn: 296858
|
|
|
|
|
|
| |
top-level const
llvm-svn: 296755
|
|
|
|
|
|
|
|
|
| |
* suggest static_cast instead of reinterpret_cast for casts from void*
* top-level const doesn't need a const_cast
* don't emit a separate "possibly redundant cast" warning, instead suggest
static_cast (in C++ only) and add a little hint to consider removing the cast
llvm-svn: 296753
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
checker
Summary:
Hello everybody,
this is an incremental patch for the NoMalloc-Checker I wrote. It allows to configure the memory-management functions, that are checked,
This might be helpful for a code base with custom functions in use, or non-standard functionality, like posix_memalign.
Reviewers: aaron.ballman, hokein, alexfh
Reviewed By: aaron.ballman, alexfh
Subscribers: sbenza, nemanjai, JDevlieghere
Tags: #clang-tools-extra
Patch by Jonas Toth!
Differential Revision: https://reviews.llvm.org/D28239
llvm-svn: 296734
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add an option to function-size to warn about high parameter counts.
This might be relevant for cppcoreguidelines and the safety module as well. Since the safety module is not landed in master already, i did not create an alias, but that can be done later as well.
Reviewers: sbenza, alexfh, hokein
Reviewed By: alexfh, hokein
Subscribers: JDevlieghere
Patch by Jonas Toth!
Differential Revision: https://reviews.llvm.org/D29561
llvm-svn: 296599
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
modernize-use-override
Summary:
Fix generated by modernize-use-override caused syntax error when method
used try-statement as a body. `override` keyword was inserted after last
declaration token which happened to be a `try` keyword.
This fixes PR27119.
Reviewers: ehsan, djasper, alexfh
Reviewed By: alexfh
Subscribers: JDevlieghere, cfe-commits
Tags: #clang-tools-extra
Patch by Paweł Żukowski!
Differential Revision: https://reviews.llvm.org/D30002
llvm-svn: 296598
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The false positive happens on two neighbour CXXDefaultArgExpr AST nodes.
like below:
```
CXXFunctionalCastExpr 0x85c9670 <col:7, col:23> 'struct ZZ' functional cast to struct ZZ <ConstructorConversion>
`-CXXConstructExpr 0x85c9518 <col:7, col:23> 'struct ZZ' 'void (uint64, const uint64 *)'
|-CallExpr 0x85a0a90 <col:10, col:22> 'uint64':'unsigned long long'
| |-ImplicitCastExpr 0x85a0a78 <col:10> 'uint64 (*)(uint64)' <FunctionToPointerDecay>
| | `-DeclRefExpr 0x85a09f0 <col:10> 'uint64 (uint64)' lvalue Function 0x85a06a0 'Hash' 'uint64 (uint64)'
| `-CXXDefaultArgExpr 0x85a0ac8 <<invalid sloc>> 'uint64':'unsigned long long'
`-CXXDefaultArgExpr 0x85c94f8 <<invalid sloc>> 'const uint64 *'
```
For each particular CXXDefaultArgExpr node, we need to reset
FirstSubExpr, otherwise FirstSubExpr will refer to an incorrect expr.
Reviewers: alexfh
Reviewed By: alexfh
Subscribers: JDevlieghere, cfe-commits
Differential Revision: https://reviews.llvm.org/D30412
llvm-svn: 296479
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D27048
llvm-svn: 296100
|
|
|
|
|
|
|
|
|
|
|
|
| |
The check doesn't really know if the code it is warning about came before
or after the header guard, so phrase it more neutral instead of complaining
about code before the header guard. The location for the warning is still
not optimal, but I don't think fixing that is worth the effort, the
preprocessor doesn't give us a better location.
Differential Revision: https://reviews.llvm.org/D30191
llvm-svn: 295715
|
|
|
|
| |
llvm-svn: 295544
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This flag allows specifying a custom path for the compilation
database. Unfortunately we can't use the -p flag like other
clang-tidy tools because it's already taken.
Reviewers: alexfh
Subscribers: JDevlieghere, cfe-commits
Differential Revision: https://reviews.llvm.org/D29806
llvm-svn: 295482
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D23421
llvm-svn: 295435
|
|
|
|
| |
llvm-svn: 295303
|