| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
check.
Summary:
The check will trigger a assert failure("CondEndLoc.isValid") when
checking the IfStmt whose condition expression is not parsed.
In this case, we should ignore that.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D17069
llvm-svn: 260505
|
|
|
|
|
|
| |
namespaces. Fix PR25812.
llvm-svn: 260217
|
|
|
|
| |
llvm-svn: 260212
|
|
|
|
|
|
|
| |
http://bb.pgr.jp/builders/cmake-clang-tools-x86_64-linux/builds/23351
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/492
llvm-svn: 260097
|
|
|
|
|
|
|
|
|
|
|
|
| |
of integral types to bool and improve the handling of implicit conversion of member pointers to bool.
Implicit conversion of member pointers are replaced with explicit comparisons to nullptr.
Implicit conversions of integral types are replaced with explicit comparisons to 0.
Patch by Richard Thomson.
llvm-svn: 260096
|
|
|
|
| |
llvm-svn: 259393
|
|
|
|
|
|
|
|
| |
forms of redundant control flow statements. Currently checks for return statements at the end of a function with a void return type and continue statements at the end of looping statements.
Patch by Richard Thomson.
llvm-svn: 259362
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html
"Now I am become Death, the destroyer of worlds."
-J. Robert Oppenheimer
Reviewers: chandlerc, grosbach, bob.wilson, echristo
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D16475
llvm-svn: 258864
|
|
|
|
| |
llvm-svn: 258835
|
|
|
|
|
|
| |
Use diagnostic parameters where possible instead of string concatenation.
llvm-svn: 257176
|
|
|
|
| |
llvm-svn: 256562
|
|
|
|
| |
llvm-svn: 256504
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
boolean expressions
This changeset still emits the diagnostic that the expression could be simplified, but it doesn't generate any fix-its that would lose comments or preprocessor directives within the text that would be replaced.
Fixes PR25842
Reviewers: alexfh
Subscribers: xazax.hun, cfe-commits
Patch by Richard Thomson! (+a naming style fix)
Differential Revision: http://reviews.llvm.org/D15737
llvm-svn: 256492
|
|
|
|
| |
llvm-svn: 256142
|
|
|
|
| |
llvm-svn: 255772
|
|
|
|
| |
llvm-svn: 255765
|
|
|
|
| |
llvm-svn: 255431
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
With this change the error reported is on the identifier location
itself. It was declaration location before.
Reviewers: alexfh
Differential Revision: http://reviews.llvm.org/D15203
llvm-svn: 254766
|
|
|
|
| |
llvm-svn: 252471
|
|
|
|
|
|
|
|
| |
parameters
Fixes http://llvm.org/PR24464.
llvm-svn: 252248
|
|
|
|
| |
llvm-svn: 251279
|
|
|
|
| |
llvm-svn: 251265
|
|
|
|
| |
llvm-svn: 251262
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is another check that I ported to clang-tidy from colobot-lint tool.
As previously discussed on cfe-dev mailing list, this is one of those
checks that I think is general and useful enough for contribution to
clang-tidy.
This patch contains implementation of check taken from colobot-lint, but
it is extended a great deal, including FixIt hints for automated
refactoring, exhaustive testcases, and user documentation.
Reviewers: sbenza, aaron.ballman, alexfh
Subscribers: Eugene.Zelenko
Differential Revision: http://reviews.llvm.org/D13635
llvm-svn: 251235
|
|
|
|
| |
llvm-svn: 251204
|
|
|
|
|
|
|
|
|
|
| |
= nullptr"
Reviewers: alexfh
Differential Revision: http://reviews.llvm.org/D13179
llvm-svn: 250742
|
|
|
|
| |
llvm-svn: 250641
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IdentifierNamingCheck
This diff requires http://reviews.llvm.org/D13079 to be applied first. I wasn't sure about how to make patch series in Phabricator, and I wanted to keep the two separate for clarity.
It looks like that most cases can be supported with this patch. I'm not totally sure about the actual coverage though. I think that the matchers are very generic, but I'm still not totally fluent with the AST.
Patch by Beren Minor!
Differential revision: http://reviews.llvm.org/D13081
llvm-svn: 248996
|
|
|
|
| |
llvm-svn: 248895
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is to level the ground a little bit, in preparation for the changes in http://reviews.llvm.org/D13081.
Code factorization replaces all insertions to NamingCheckFailures map with a unique addUsage function that does the job.
There is also no more difference between the declaration and the references to a given identifier, both cases are treated as ranges in the Usage vector. There is also a check to avoid duplicated ranges to be inserted, which sometimes triggered erroneous replacements.
References can now also be added before the declaration of the identifier is actually found; this looks to be the case for example when a templated class uses its parameters to specialize its templated base class.
Patch by Beren Minor!
Differential revision: http://reviews.llvm.org/D13079
llvm-svn: 248700
|
|
|
|
|
|
| |
32-bit integer. NFC
llvm-svn: 248139
|
|
|
|
|
|
| |
correlates to r247885 which performs the AST matcher rename in Clang.
llvm-svn: 247886
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is first of series of patches, porting code from my project colobot-lint,
as I mentioned recently in cfe-dev mailing list.
This patch adds a new check in readability module:
readability-inconsistent-declaration-parameter-name. I also added appropriate
testcases and documentation.
I chose readability module, as it seems it is the best place for it.
I think I followed the rules of LLVM coding guideline, but I may have missed
something, as I usually use other code formatting style.
http://reviews.llvm.org/D12462
Patch by Piotr Dziwinski!
llvm-svn: 247261
|
|
|
|
|
|
|
|
|
|
|
| |
Fix http://llvm.org/PR22785. Bug 22785 - readability-braces-around-statements
doesn't work well with macros.
http://reviews.llvm.org/D12729
Patch by Marek Kurdej!
llvm-svn: 247163
|
|
|
|
|
|
| |
of the checkers require additional testing as the tests will not compile for other languages or modes, or the checkers would never match a valid construct.
llvm-svn: 246661
|
|
|
|
|
|
|
|
|
| |
"modernize/"
These checks are focusing on migrating the code from C++98/03 to C++11, so they
belong to the modernize module.
llvm-svn: 246437
|
|
|
|
|
|
|
|
|
|
|
| |
Changes mostly address formatting and unification of the style. Use
MarkDown style for inline code snippets and lists. Added some text
for a few checks.
The idea is to move most of the documentation out to separate rST files and have
implementation files refer to the corresponding documentation files.
llvm-svn: 246169
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This check will try to enforce coding guidelines on the identifiers naming.
It supports lower_case, UPPER_CASE, camelBack and CamelCase casing and
tries to convert from one to another if a mismatch is detected.
It also supports a fixed prefix and suffix that will be prepended or appended
to the identifiers, regardless of the casing.
Many configuration options are available, in order to be able to create
different rules for different kind of identifier. In general, the
rules are falling back to a more generic rule if the specific case is not
configured.
http://reviews.llvm.org/D10933
Patch by Beren Minor!
llvm-svn: 245429
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
violations.
llvm-svn: 239904
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This check looks for comparisons between boolean expressions and boolean
constants and simplifies them to just use the appropriate boolean expression
directly.
if (b == true) becomes if (b)
if (b == false) becomes if (!b)
if (b && true) becomes if (b)
if (b && false) becomes if (false)
if (b || true) becomes if (true)
if (b || false) becomes if (b)
e ? true : false becomes e
e ? false : true becomes !e
if (true) t(); else f(); becomes t();
if (false) t(); else f(); becomes f();
if (e) return true; else return false; becomes return (e);
if (e) return false; else return true; becomes return !(e);
if (e) b = true; else b = false; becomes b = e;
if (e) b = false; else b = true; becomes b = !(e);
http://reviews.llvm.org/D7648
Patch by Richard Thomson!
llvm-svn: 234626
|
|
|
|
|
|
|
| |
NamespaceCommentCheck: Don't remove the token placed immediately after the
namespace closing brace.
llvm-svn: 234403
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Force braces on the else branch if they are being added to the if branch.
This ensures consistency in the transformed code.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8708
llvm-svn: 233697
|
|
|
|
|
|
| |
Also purge dead code found by it. NFC.
llvm-svn: 232948
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
readability-named-parameter.
Summary: The relevant style rule is going to be removed, thus the check is no longer needed in the Google module. Leaving the check in readability/ in case someone needs it.
Reviewers: djasper
Reviewed By: djasper
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D8261
llvm-svn: 232431
|
|
|
|
|
|
|
|
|
|
| |
readability-redundant-string-cstr
http://reviews.llvm.org/D7318
Patch by Richard Thomson!
llvm-svn: 232338
|