Revision tags: llvmorg-18.1.8 |
|
#
429e5be7 |
| 06-Jun-2024 |
Piotr Zegar <me@piotrzegar.pl> |
[clang-tidy] Fix crash in readability-container-size-empty (#94527)
Fixed crash caused by call to getCookedLiteral on
template user defined literal. Fix base on assert in getCookedLiteral
method.
[clang-tidy] Fix crash in readability-container-size-empty (#94527)
Fixed crash caused by call to getCookedLiteral on
template user defined literal. Fix base on assert in getCookedLiteral
method.
Closes #94454
show more ...
|
Revision tags: llvmorg-18.1.7 |
|
#
57da0407 |
| 30-May-2024 |
Piotr Zegar <me@piotrzegar.pl> |
[clang-tidy] Check number of arguments to size/length in readability-container-size-empty (#93724)
Verify that size/length methods are called with no arguments.
Closes #88203
|
Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init |
|
#
7f1d757f |
| 14-Jan-2024 |
Piotr Zegar <me@piotrzegar.pl> |
[clang-tidy] Fix false-positives in readability-container-size-empty (#74140)
Added support for size-like method returning signed type, and corrected
false positive caused by always-false check for
[clang-tidy] Fix false-positives in readability-container-size-empty (#74140)
Added support for size-like method returning signed type, and corrected
false positive caused by always-false check for size bellow zero.
Closes #72619
show more ...
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4 |
|
#
efebb4e0 |
| 31-Aug-2023 |
Piotr Zegar <me@piotrzegar.pl> |
[clang-tidy] readability-container-size-empty handle std::string length()
Extends readability-container-size-empty to check std::string length() similar to size().
Fixes: #37603
Co-authored-by: Dm
[clang-tidy] readability-container-size-empty handle std::string length()
Extends readability-container-size-empty to check std::string length() similar to size().
Fixes: #37603
Co-authored-by: Dmitry Venikov <quolyk@gmail.com>
Reviewed By: carlosgalvezp
Differential Revision: https://reviews.llvm.org/D56644
show more ...
|
Revision tags: llvmorg-17.0.0-rc3 |
|
#
4001ae17 |
| 21-Aug-2023 |
Felix <felix-antoine.constantin@polymtl.ca> |
[clang-tidy] readability-container-size-empty - detect missing usage of .empty() on string_literals
Detect comparison between string and empty string_literals.
Fixes #64547
Reviewed By: PiotrZSL
[clang-tidy] readability-container-size-empty - detect missing usage of .empty() on string_literals
Detect comparison between string and empty string_literals.
Fixes #64547
Reviewed By: PiotrZSL
Differential Revision: https://reviews.llvm.org/D158346
show more ...
|
Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4 |
|
#
e08cc52c |
| 25-Feb-2023 |
Piotr Zegar <piotr.zegar@nokia.com> |
[clang-tidy] Fix false-positive in readability-container-size-empty
Ignoring std::array type when matching 'std:array == std::array()'. In such case we shouldn't propose to use empty().
Fixes: http
[clang-tidy] Fix false-positive in readability-container-size-empty
Ignoring std::array type when matching 'std:array == std::array()'. In such case we shouldn't propose to use empty().
Fixes: https://github.com/llvm/llvm-project/issues/48286
Differential Revision: https://reviews.llvm.org/D144217
show more ...
|
Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init |
|
#
7d2ea6c4 |
| 14-Jan-2023 |
Carlos Galvez <carlosgalvezp@gmail.com> |
[clang-tidy][NFC] Use C++17 nested namespaces in the clang-tidy folder
Fix applied by running:
run-clang-tidy.py -checks=-*,modernize-concat-nested-namespaces
Differential Revision: https://review
[clang-tidy][NFC] Use C++17 nested namespaces in the clang-tidy folder
Fix applied by running:
run-clang-tidy.py -checks=-*,modernize-concat-nested-namespaces
Differential Revision: https://reviews.llvm.org/D141770
show more ...
|
Revision tags: llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2 |
|
#
7dc410cb |
| 08-Aug-2022 |
Haojian Wu <hokein.wu@gmail.com> |
[clang-tidy] Fix a regression of readability-container-size-empty after the AST ElaboratedType change.
With 15f3cd6bfc670ba6106184a903eb04be059e5977, we no longer emit a diagnostic on a real std::ve
[clang-tidy] Fix a regression of readability-container-size-empty after the AST ElaboratedType change.
With 15f3cd6bfc670ba6106184a903eb04be059e5977, we no longer emit a diagnostic on a real std::vector case where the size method returns a sugar `size_type`. This patch fixes it.
``` std::vector<int> v; if (v.size() == 0) // => no check diagnostics ; ```
Differential Revision: https://reviews.llvm.org/D131390
show more ...
|
Revision tags: llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2 |
|
#
fb3b3f76 |
| 20-Apr-2022 |
Fabian Wolff <fabian.wolff@alumni.ethz.ch> |
[clang-tidy] Fix `readability-container-size-empty` check for smart pointers
Fixes https://github.com/llvm/llvm-project/issues/51118.
Reviewed By: Sockke
Differential Revision: https://reviews.llv
[clang-tidy] Fix `readability-container-size-empty` check for smart pointers
Fixes https://github.com/llvm/llvm-project/issues/51118.
Reviewed By: Sockke
Differential Revision: https://reviews.llvm.org/D115124
show more ...
|
Revision tags: llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
#
7ad94bd7 |
| 12-Feb-2022 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
[clang-tidy] ContainerSizeEmptyCheck::check - simplify isa<> and dyn_cast<> repeated calls
Just use dyn_cast<> to determine literal + container values from the binop
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
#
ade0662c |
| 02-Nov-2021 |
Salman Javed <mail@salmanjaved.org> |
[clang-tidy] Fix lint warnings in clang-tidy source code (NFC)
Run clang-tidy on all source files under `clang-tools-extra/clang-tidy` with `-header-filter=clang-tidy.*` and make suggested correctio
[clang-tidy] Fix lint warnings in clang-tidy source code (NFC)
Run clang-tidy on all source files under `clang-tools-extra/clang-tidy` with `-header-filter=clang-tidy.*` and make suggested corrections.
Differential Revision: https://reviews.llvm.org/D112864
show more ...
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1 |
|
#
2cba22c2 |
| 22-Dec-2020 |
Stephen Kelly <steveire@gmail.com> |
[clang-tidy] Simplify implementation of container-size-empty
Use IgnoreUnlessSpelledInSource to make the matcher code smaller and more visibly-related to the code.
Differential Revision: https://re
[clang-tidy] Simplify implementation of container-size-empty
Use IgnoreUnlessSpelledInSource to make the matcher code smaller and more visibly-related to the code.
Differential Revision: https://reviews.llvm.org/D91303
show more ...
|
#
c0199b2a |
| 02-Jan-2021 |
Stephen Kelly <steveire@gmail.com> |
[clang-tidy] Use new mapping matchers
Use mapAnyOf() and matchers based on it.
Use of binaryOperation() means that modernize-loop-convert and readability-container-size-empty can now be used with r
[clang-tidy] Use new mapping matchers
Use mapAnyOf() and matchers based on it.
Use of binaryOperation() means that modernize-loop-convert and readability-container-size-empty can now be used with rewritten binary operators.
Differential Revision: https://reviews.llvm.org/D94131
show more ...
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
#
a5311d73 |
| 27-Oct-2020 |
Stephen Kelly <steveire@gmail.com> |
[clang-tidy] Handle template instantiations in container size check
readability-container-size-empty currently modifies source code based on AST nodes in template instantiations, which means that it
[clang-tidy] Handle template instantiations in container size check
readability-container-size-empty currently modifies source code based on AST nodes in template instantiations, which means that it makes transformations based on substituted types. This can lead to transforming code to be broken.
Change the matcher implementation to ignore template instantiations explicitly, and add a matcher to explicitly handle template declarations instead of instantiations.
Differential Revision: https://reviews.llvm.org/D91302
show more ...
|
#
027899da |
| 10-Dec-2020 |
Alexander Kornienko <alexfh@google.com> |
Remove references to the ast_type_traits namespace
Follow up to cd62511496938e33c061c90796dd23a5288ff843 / https://reviews.llvm.org/D74499
Reviewed By: aaron.ballman
Differential Revision: https:/
Remove references to the ast_type_traits namespace
Follow up to cd62511496938e33c061c90796dd23a5288ff843 / https://reviews.llvm.org/D74499
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D92994
show more ...
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
a72307c3 |
| 12-Nov-2019 |
Stephen Kelly <steveire@gmail.com> |
Set traversal explicitly where needed in clang-tidy
Reviewers: aaron.ballman
Subscribers: nemanjai, kbarton, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72
Set traversal explicitly where needed in clang-tidy
Reviewers: aaron.ballman
Subscribers: nemanjai, kbarton, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72530
show more ...
|
#
97572fa6 |
| 10-Mar-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[NFC] use hasAnyOperatorName and hasAnyOverloadedOperatorName functions in clang-tidy matchers
|
#
223a43ee |
| 09-Mar-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy] [NFC] Remove unnecessary matchers
Reviewers: aaron.ballman, alexfh, gribozavr2
Reviewed By: aaron.ballman
Subscribers: wuzish, nemanjai, xazax.hun, kbarton, cfe-commits
Tags: #clang,
[clang-tidy] [NFC] Remove unnecessary matchers
Reviewers: aaron.ballman, alexfh, gribozavr2
Reviewed By: aaron.ballman
Subscribers: wuzish, nemanjai, xazax.hun, kbarton, cfe-commits
Tags: #clang, #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D75803
show more ...
|
#
e40a742a |
| 03-Mar-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy] Change checks to use new isLanguageVersionSupported restriction
Summary: Modifies all checks that are language version dependent to use `isLanguageVersionSupported`
Reviewers: jdoerfer
[clang-tidy] Change checks to use new isLanguageVersionSupported restriction
Summary: Modifies all checks that are language version dependent to use `isLanguageVersionSupported`
Reviewers: jdoerfert, lebedev.ri, aaron.ballman, gribozavr2, Eugene.Zelenko
Reviewed By: gribozavr2
Subscribers: wuzish, nemanjai, xazax.hun, hiraditya, kbarton, steven_wu, dexonsmith, arphaman, lebedev.ri, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D75340
show more ...
|
#
adcd0268 |
| 28-Jan-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly m
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies.
This doesn't actually modify StringRef yet, I'll do that in a follow-up.
show more ...
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
#
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 ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3 |
|
#
8577dcc5 |
| 27-Nov-2018 |
Alexander Kornienko <alexfh@google.com> |
[clang-tidy] Avoid inconsistent notes in readability-container-size-empty
When a warning is issued in a template instantiation, the check would previously use template arguments in a note, which wou
[clang-tidy] Avoid inconsistent notes in readability-container-size-empty
When a warning is issued in a template instantiation, the check would previously use template arguments in a note, which would result in inconsistent or duplicate warnings (depending on how deduplication was done). This patch removes template arguments from the note.
llvm-svn: 347652
show more ...
|
Revision tags: llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2 |
|
#
43465bf3 |
| 09-Aug-2018 |
Stephen Kelly <steveire@gmail.com> |
Port getLocStart -> getBeginLoc
Reviewers: javed.absar
Subscribers: nemanjai, kbarton, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D5
Port getLocStart -> getBeginLoc
Reviewers: javed.absar
Subscribers: nemanjai, kbarton, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D50354
llvm-svn: 339400
show more ...
|
Revision tags: llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2 |
|
#
7b9c117b |
| 02-Aug-2017 |
Manuel Klimek <klimek@google.com> |
Adapt clang-tidy checks to changing semantics of hasDeclaration.
Differential Revision: https://reviews.llvm.org/D36154
llvm-svn: 309810
|
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 |
|
#
72163a9d |
| 24-Apr-2017 |
Aaron Ballman <aaron@aaronballman.com> |
Extend readability-container-size-empty to add comparisons to empty-state objects.
Patch by Josh Zimmerman.
llvm-svn: 301185
|