#
29dc0b17 |
| 30-Oct-2019 |
Aaron Ballman <aaron@aaronballman.com> |
Add the readability-redundant-access-specifiers check.
This finds redundant access specifier declarations inside classes, structs, and unions.
Patch by Mateusz Mackowski.
|
#
ffca3222 |
| 16-Jul-2019 |
Matthias Gehre <M.Gehre@gmx.de> |
[clang-tidy] initial version of readability-convert-member-functions-to-static
Summary: Finds non-static member functions that can be made ``static``.
I have run this check (repeatedly) over llvm-p
[clang-tidy] initial version of readability-convert-member-functions-to-static
Summary: Finds non-static member functions that can be made ``static``.
I have run this check (repeatedly) over llvm-project. It made 1708 member functions ``static``. Out of those, I had to exclude 22 via ``NOLINT`` because their address was taken and stored in a variable of pointer-to-member type (e.g. passed to llvm::StringSwitch). It also made 243 member functions ``const``. (This is currently very conservative to have no false-positives and can hopefully be extended in the future.)
You can find the results here: https://github.com/mgehre/llvm-project/commits/static_const_eval
Reviewers: alexfh, aaron.ballman
Subscribers: mgorny, xazax.hun, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61749
llvm-svn: 366265
show more ...
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
#
98ef5337 |
| 11-Jan-2019 |
Miklos Vajna <vmiklos@vmiklos.hu> |
[clang-tidy] new check 'readability-redundant-preprocessor'
Finds potentially redundant preprocessor directives.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D54349
[clang-tidy] new check 'readability-redundant-preprocessor'
Finds potentially redundant preprocessor directives.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D54349
llvm-svn: 350922
show more ...
|
#
3a02722a |
| 31-Oct-2018 |
Aaron Ballman <aaron@aaronballman.com> |
Implement the readability-const-return-type check.
This check flags function top-level const-qualified return types and suggests removing the mostly-superfluous const qualifier where possible.
Patc
Implement the readability-const-return-type check.
This check flags function top-level const-qualified return types and suggests removing the mostly-superfluous const qualifier where possible.
Patch by Yitzhak Mandelbaum.
llvm-svn: 345764
show more ...
|
#
0ea5af7a |
| 31-Oct-2018 |
Jonas Toth <jonas.toth@gmail.com> |
[clang-tidy] new check 'readability-isolate-declaration'
Summary: This patch introduces a new clang-tidy check that matches on all `declStmt` that declare more then one variable and transform them i
[clang-tidy] new check 'readability-isolate-declaration'
Summary: This patch introduces a new clang-tidy check that matches on all `declStmt` that declare more then one variable and transform them into one statement per declaration if possible.
It currently only focusses on variable declarations but should be extended to cover more kinds of declarations in the future. It is related to https://reviews.llvm.org/D27621 and does use it's extensive test-suite. Thank you to firolino for his work!
Reviewers: rsmith, aaron.ballman, alexfh, hokein, kbobyrev
Reviewed By: aaron.ballman
Subscribers: ZaMaZaN4iK, mgehre, nemanjai, kbarton, lebedev.ri, Eugene.Zelenko, mgorny, xazax.hun, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D51949
llvm-svn: 345735
show more ...
|
#
08701ec7 |
| 26-Oct-2018 |
Roman Lebedev <lebedev.ri@gmail.com> |
[clang-tidy] Re-commit: Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)
Summary: Detects when the integral literal or floating point (d
[clang-tidy] Re-commit: Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)
Summary: Detects when the integral literal or floating point (decimal or hexadecimal) literal has non-uppercase suffix, and suggests to make the suffix uppercase, with fix-it.
All valid combinations of suffixes are supported.
``` auto x = 1; // OK, no suffix.
auto x = 1u; // warning: integer literal suffix 'u' is not upper-case
auto x = 1U; // OK, suffix is uppercase.
... ```
This is a re-commit, the original was reverted by me in rL345305 due to discovered bugs. (implicit code, template instantiation) Tests were added, and the bugs were fixed. I'm unable to find any further bugs, hopefully there aren't any..
References: * [[ https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?pageId=87152241 | CERT DCL16-C ]] * MISRA C:2012, 7.3 - The lowercase character "l" shall not be used in a literal suffix * MISRA C++:2008, 2-13-4 - Literal suffixes shall be upper case
Reviewers: JonasToth, aaron.ballman, alexfh, hokein, xazax.hun
Reviewed By: aaron.ballman
Subscribers: Eugene.Zelenko, mgorny, rnkovacs, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D52670
llvm-svn: 345381
show more ...
|
#
5aa945e7 |
| 25-Oct-2018 |
Roman Lebedev <lebedev.ri@gmail.com> |
[clang-tidy] Revert my readability-uppercase-literal-suffix check.
There are some lurking issues with the handling of the SourceManager. Somehow sometimes we end up extracting completely wrong porti
[clang-tidy] Revert my readability-uppercase-literal-suffix check.
There are some lurking issues with the handling of the SourceManager. Somehow sometimes we end up extracting completely wrong portions of the source buffer.
Reverts r344772, r44760, r344758, r344755.
llvm-svn: 345305
show more ...
|
#
b2eec586 |
| 18-Oct-2018 |
Roman Lebedev <lebedev.ri@gmail.com> |
[clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)
Summary: Detects when the integral literal or floating point (decimal or h
[clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)
Summary: Detects when the integral literal or floating point (decimal or hexadecimal) literal has non-uppercase suffix, and suggests to make the suffix uppercase, with fix-it.
All valid combinations of suffixes are supported.
``` auto x = 1; // OK, no suffix.
auto x = 1u; // warning: integer literal suffix 'u' is not upper-case
auto x = 1U; // OK, suffix is uppercase.
... ```
References: * [[ https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?pageId=87152241 | CERT DCL16-C ]] * MISRA C:2012, 7.3 - The lowercase character "l" shall not be used in a literal suffix * MISRA C++:2008, 2-13-4 - Literal suffixes shall be upper case
Reviewers: JonasToth, aaron.ballman, alexfh, hokein, xazax.hun
Reviewed By: aaron.ballman
Subscribers: Eugene.Zelenko, mgorny, rnkovacs, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D52670
llvm-svn: 344755
show more ...
|
#
bc8f5ac7 |
| 12-Aug-2018 |
Aaron Ballman <aaron@aaronballman.com> |
Add a new check to the readability module that flags uses of "magic numbers" (both floating-point and integral).
Patch by Florin Iucha <florin@signbit.net>
llvm-svn: 339516
|
#
cc740ae5 |
| 16-May-2018 |
Aaron Ballman <aaron@aaronballman.com> |
Add a new check, readability-simplify-subscript-expr, that diagnoses array subscript expressions that can be simplified.
Currently, diagnoses code that calls container.data()[some_index] when the co
Add a new check, readability-simplify-subscript-expr, that diagnoses array subscript expressions that can be simplified.
Currently, diagnoses code that calls container.data()[some_index] when the container exposes a suitable operator[]() method that can be used directly.
Patch by Shuai Wang.
llvm-svn: 332519
show more ...
|
#
c0e768df |
| 07-Mar-2018 |
Fangrui Song <maskray@google.com> |
[clang-tidy] Add "portability" module and rename readability-simd-intrinsics to portability-simd-intrinsics
Reviewers: alexfh
Subscribers: klimek, nemanjai, mgorny, xazax.hun, kbarton, cfe-commits
[clang-tidy] Add "portability" module and rename readability-simd-intrinsics to portability-simd-intrinsics
Reviewers: alexfh
Subscribers: klimek, nemanjai, mgorny, xazax.hun, kbarton, cfe-commits
Differential Revision: https://reviews.llvm.org/D44173
llvm-svn: 326909
show more ...
|
#
258a9590 |
| 15-Feb-2018 |
Fangrui Song <maskray@google.com> |
[clang-tidy] Add `readability-simd-intrinsics` check.
Summary: Many architectures provide SIMD operations (e.g. x86 SSE/AVX, Power AltiVec/VSX, ARM NEON). It is common that SIMD code implementing th
[clang-tidy] Add `readability-simd-intrinsics` check.
Summary: Many architectures provide SIMD operations (e.g. x86 SSE/AVX, Power AltiVec/VSX, ARM NEON). It is common that SIMD code implementing the same algorithm, is written in multiple target-dispatching pieces to optimize for different architectures or micro-architectures.
The C++ standard proposal P0214 and its extensions cover many common SIMD operations. By migrating from target-dependent intrinsics to P0214 operations, the SIMD code can be simplified and pieces for different targets can be unified.
Refer to http://wg21.link/p0214 for introduction and motivation for the data-parallel standard library.
Subscribers: klimek, aemerson, mgorny, xazax.hun, kristof.beyls, hintonda, cfe-commits
Differential Revision: https://reviews.llvm.org/D42983
llvm-svn: 325272
show more ...
|
#
5c9c0427 |
| 30-Jan-2018 |
Alexander Kornienko <alexfh@google.com> |
clang-tidy/rename_check.py misc-string-compare readability-string-compare
llvm-svn: 323766
|
Revision tags: llvmorg-5.0.0-rc2 |
|
#
40b6512d |
| 08-Aug-2017 |
Gabor Horvath <xazax.hun@gmail.com> |
[clang-tidy] Add new readability non-idiomatic static access check
Patch by: Lilla Barancsuk
Differential Revision: https://reviews.llvm.org/D35937
llvm-svn: 310371
|
#
f1a6552a |
| 08-Aug-2017 |
Alexander Kornienko <alexfh@google.com> |
[clang-tidy] 'implicit cast' -> 'implicit conversion'
Summary: This patch renames checks, check options and changes messages to use correct term "implicit conversion" instead of "implicit cast" (whi
[clang-tidy] 'implicit cast' -> 'implicit conversion'
Summary: This patch renames checks, check options and changes messages to use correct term "implicit conversion" instead of "implicit cast" (which has been in use in Clang AST since ~10 years, but it's still technically incorrect w.r.t. C++ standard).
* performance-implicit-cast-in-loop -> performance-implicit-conversion-in-loop * readability-implicit-bool-cast -> readability-implicit-bool-conversion - readability-implicit-bool-cast.AllowConditionalIntegerCasts -> readability-implicit-bool-conversion.AllowIntegerConditions - readability-implicit-bool-cast.AllowConditionalPointerCasts -> readability-implicit-bool-conversion.AllowPointerConditions
Reviewers: hokein, jdennett
Reviewed By: hokein
Subscribers: mgorny, JDevlieghere, xazax.hun, cfe-commits
Differential Revision: https://reviews.llvm.org/D36456
llvm-svn: 310366
show more ...
|
Revision tags: llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3 |
|
#
e647bd59 |
| 14-Feb-2017 |
Gabor Horvath <xazax.hun@gmail.com> |
[clang-tidy] Add readability-misleading-indentation check.
Differential Revision: https://reviews.llvm.org/D19586
llvm-svn: 295041
|
Revision tags: llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1 |
|
#
7510d9aa |
| 31-Dec-2016 |
Gabor Horvath <xazax.hun@gmail.com> |
[clang-tidy] Add delete null pointer check.
This check detects and fixes redundant null checks before deletes.
Patch by: Gergely Angeli!
Differential Revision: https://reviews.llvm.org/D21298
llv
[clang-tidy] Add delete null pointer check.
This check detects and fixes redundant null checks before deletes.
Patch by: Gergely Angeli!
Differential Revision: https://reviews.llvm.org/D21298
llvm-svn: 290784
show more ...
|
#
e7be4a00 |
| 13-Dec-2016 |
Malcolm Parsons <malcolm.parsons@gmail.com> |
[clang-tidy] Add check for redundant function pointer dereferences
Reviewers: alexfh, aaron.ballman, hokein
Subscribers: mgorny, JDevlieghere, cfe-commits
Differential Revision: https://reviews.ll
[clang-tidy] Add check for redundant function pointer dereferences
Reviewers: alexfh, aaron.ballman, hokein
Subscribers: mgorny, JDevlieghere, cfe-commits
Differential Revision: https://reviews.llvm.org/D27520
llvm-svn: 289524
show more ...
|
Revision tags: llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1 |
|
#
399a50cf |
| 01-Nov-2016 |
Daniel Marjamaki <daniel.marjamaki@evidente.se> |
[clang-tidy] Add check readability-redundant-declaration
Finds redundant variable and function declarations.
extern int X; extern int X; // <- redundant
Differential Revision: https://reviews
[clang-tidy] Add check readability-redundant-declaration
Finds redundant variable and function declarations.
extern int X; extern int X; // <- redundant
Differential Revision: https://reviews.llvm.org/D24656
llvm-svn: 285689
show more ...
|
#
5c24a114 |
| 20-Oct-2016 |
Malcolm Parsons <malcolm.parsons@gmail.com> |
[clang-tidy] Add check 'readability-redundant-member-init'
Summary: The check emits a warning if a member-initializer calls the member's default constructor with no arguments.
Reviewers: sbenza, al
[clang-tidy] Add check 'readability-redundant-member-init'
Summary: The check emits a warning if a member-initializer calls the member's default constructor with no arguments.
Reviewers: sbenza, alexfh, aaron.ballman
Subscribers: modocache, mgorny, Eugene.Zelenko, etienneb, Prazek, hokein, cfe-commits, beanz
Differential Revision: https://reviews.llvm.org/D24339
llvm-svn: 284742
show more ...
|
#
03ea468a |
| 12-Sep-2016 |
Daniel Marjamaki <daniel.marjamaki@evidente.se> |
[clang-tidy] readability-misplaced-array-index: add new check that warns when array index is misplaced.
Reviewers: alexfh
Differential Revision: https://reviews.llvm.org/D21134
llvm-svn: 281206
|
Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3 |
|
#
9e4ecfae |
| 23-Aug-2016 |
Daniel Marjamaki <daniel.marjamaki@evidente.se> |
[clang-tidy] readability-non-const-parameter: add new check that warns when function parameters should be const
The check will warn when the constness will make the function interface safer.
Review
[clang-tidy] readability-non-const-parameter: add new check that warns when function parameters should be const
The check will warn when the constness will make the function interface safer.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D15332
llvm-svn: 279507
show more ...
|
Revision tags: llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1, llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
#
4191b90c |
| 13-Apr-2016 |
Alexander Kornienko <alexfh@google.com> |
[clang-tidy] Add a readability-deleted-default clang-tidy check.
Checks if constructors and assignment operators that are marked '= default' are actually deleted by the compiler.
Patch by Alex Pilk
[clang-tidy] Add a readability-deleted-default clang-tidy check.
Checks if constructors and assignment operators that are marked '= default' are actually deleted by the compiler.
Patch by Alex Pilkiewicz!
Differential Revision: http://reviews.llvm.org/D18961
llvm-svn: 266190
show more ...
|
#
c253f8b0 |
| 05-Apr-2016 |
Haojian Wu <hokein@google.com> |
[clang-tidy] Add a check to detect static definitions in anonymous namespace.
Summary: Fixes PR26595
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D181
[clang-tidy] Add a check to detect static definitions in anonymous namespace.
Summary: Fixes PR26595
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D18180
llvm-svn: 265384
show more ...
|