Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3 |
|
#
1b0fcf1e |
| 22-Oct-2024 |
Vlad Serebrennikov <serebrennikov.vladislav@gmail.com> |
[clang-tidy][NFC] Replace usages of `DeclSpec::TQ` with `Qualifiers::TQ` (#113295)
This patch improves, but doens't fully resolve the layering violation,
which stems from relying on Sema. There's o
[clang-tidy][NFC] Replace usages of `DeclSpec::TQ` with `Qualifiers::TQ` (#113295)
This patch improves, but doens't fully resolve the layering violation,
which stems from relying on Sema. There's one function that needs to
convert enumerator to a string (`buildQualifier` in
`FixItHintUtils.cpp`), but `Qualifiers::TQ` doesn't offer such function.
Even more, the set of enumerators is not complete compared to
`DeclSpec::TQ`, so I'm afraid that this would be a functional change.
show more ...
|
Revision tags: llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, 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 |
|
#
8fd32b96 |
| 16-Jan-2024 |
Clement Courbet <courbet@google.com> |
[clang-tidy] Handle C++ structured bindings in `performance-for-range-copy` (#77105)
Right now we are not triggering on:
```
for (auto [x, y] : container) {
// const-only access
}
```
|
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, llvmorg-17.0.0-rc3, 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, 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 |
|
#
f71ffd3b |
| 08-Jan-2023 |
Kazu Hirata <kazu@google.com> |
[clang-tools-extra] Use std::optional instead of llvm::Optional (NFC)
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to clean up the "using" declarations, #i
[clang-tools-extra] Use std::optional instead of llvm::Optional (NFC)
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to clean up the "using" declarations, #include "llvm/ADT/Optional.h", etc.
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|
#
71f55735 |
| 08-Jan-2023 |
Kazu Hirata <kazu@google.com> |
[clang-tools-extra] Add #include <optional> (NFC)
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>.
I'll post a separate patch to actually replace
[clang-tools-extra] Add #include <optional> (NFC)
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>.
I'll post a separate patch to actually replace llvm::Optional with std::optional.
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|
Revision tags: 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, 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, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, 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, 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 |
|
#
a189b3b9 |
| 26-Feb-2021 |
Felix Berger <flx@google.com> |
[clang-tidy] performance-for-range-copy: Don't trigger on implicit type conversions.
This disables the check for false positive cases where implicit type conversion through either an implicit single
[clang-tidy] performance-for-range-copy: Don't trigger on implicit type conversions.
This disables the check for false positive cases where implicit type conversion through either an implicit single argument constructor or a member conversion operator is triggered when constructing the loop variable.
Fix the test cases that meant to cover these cases.
Differential Revision: https://reviews.llvm.org/D97577
Reviewed-by: hokein
show more ...
|
Revision tags: 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, llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
#
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.1-rc1, 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 ...
|
#
3adaa97f |
| 06-May-2020 |
Dmitri Gribenko <gribozavr@gmail.com> |
Fix ForRangeCopyCheck not triggering on iterators returning elements by value in C++17.
Summary: The AST is different in C++17 in that there is no MaterializeTemporaryExpr for in the AST for a loop
Fix ForRangeCopyCheck not triggering on iterators returning elements by value in C++17.
Summary: The AST is different in C++17 in that there is no MaterializeTemporaryExpr for in the AST for a loop variable that is initialized from an iterator that returns its elements by value.
Account for this by checking that the variable is not initialized by an operator* call that returns a value type.
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D79440
show more ...
|
#
672207c3 |
| 09-Apr-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)?
Summary: This was done with a script that looks for calls to Options.get(GlobalOrLocal) that take a
[clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)?
Summary: This was done with a script that looks for calls to Options.get(GlobalOrLocal) that take an integer for the second argument and the result is either compared not equal to 0 or implicitly converted to bool. There may be other occurances
Reviewers: aaron.ballman, alexfh, gribozavr2
Reviewed By: aaron.ballman
Subscribers: wuzish, nemanjai, xazax.hun, kbarton, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D77831
show more ...
|
#
cf481012 |
| 03-Jan-2020 |
Jonas Toth <development@jonas-toth.eu> |
[clang-tidy] implement utility-function to add 'const' to variables
Summary: This patch extends the already existing facility to add 'const' to variables to be more flexible and correct. The previou
[clang-tidy] implement utility-function to add 'const' to variables
Summary: This patch extends the already existing facility to add 'const' to variables to be more flexible and correct. The previous version did not consider pointers as value AND pointee. For future automatic introduction for const-correctness this shortcoming needs to be fixed. It always allows configuration where the 'const' token is inserted, either on the left side (if possible) or the right side. It adds many unit-tests to the utility-function that did not exist before, as the function was implicitly tested through clang-tidy checks. These tests were not changed, as the API is still compatible.
Reviewers: aaron.ballman, hokein, alexfh, shuaiwang, lebedev.ri
Reviewed By: aaron.ballman
Subscribers: jdoerfert, mgorny, xazax.hun, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D54395
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, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1 |
|
#
abd72e98 |
| 12-Oct-2018 |
Adam Balogh <adam.balogh@ericsson.com> |
[clang-tidy] White List Option for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy
New option added to these three checks to be able t
[clang-tidy] White List Option for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy
New option added to these three checks to be able to silence false positives on types that are intentionally passed by value or copied. Such types are e.g. intrusive reference counting pointer types like llvm::IntrusiveRefCntPtr. The new option is named WhiteListTypes and can contain a semicolon-separated list of names of these types. Regular expressions are allowed. Default is empty.
Differential Revision: https://reviews.llvm.org/D52727
llvm-svn: 344340
show more ...
|
Revision tags: llvmorg-7.0.0 |
|
#
f21e8ebb |
| 11-Sep-2018 |
Shuai Wang <shuaiwang@google.com> |
[clangtidy] Remove old copy of ExprMutationAnalyzer
Summary: This is 2/2 of moving ExprMutationAnalyzer from clangtidy to clang/Analysis. ExprMutationAnalyzer is moved to clang/Analysis in D51948. T
[clangtidy] Remove old copy of ExprMutationAnalyzer
Summary: This is 2/2 of moving ExprMutationAnalyzer from clangtidy to clang/Analysis. ExprMutationAnalyzer is moved to clang/Analysis in D51948. This diff migrates existing usages within clangtidy to point to the new location and remove the old copy of ExprMutationAnalyzer.
Reviewers: george.karpenkov, JonasToth
Reviewed By: george.karpenkov
Subscribers: mgorny, a.sidorin, Szelethus, cfe-commits
Differential Revision: https://reviews.llvm.org/D51950
llvm-svn: 342006
show more ...
|
#
a3dc9484 |
| 10-Sep-2018 |
Roman Lebedev <lebedev.ri@gmail.com> |
[clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888
Summary: I have hit this the rough way, while trying to use this in D51870.
There is no particular point in storing the p
[clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888
Summary: I have hit this the rough way, while trying to use this in D51870.
There is no particular point in storing the pointers, and moreover the pointers are assumed to be non-null, and that assumption is not enforced. If they are null, it won't be able to do anything good with them anyway.
Initially i thought about simply adding asserts() that they are not null, but taking/storing references looks like even cleaner solution?
Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=38888 | PR38888 ]]
Reviewers: JonasToth, shuaiwang, alexfh, george.karpenkov
Reviewed By: shuaiwang
Subscribers: xazax.hun, a.sidorin, Szelethus, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D51884
llvm-svn: 341854
show more ...
|
Revision tags: llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2 |
|
#
25efa0fa |
| 10-Aug-2018 |
Haojian Wu <hokein@google.com> |
[clang-tidy] Omit cases where loop variable is not used in loop body in performance-for-range-copy check.
Summary: The upstream change r336737 make the check too smart to fix the case where loop var
[clang-tidy] Omit cases where loop variable is not used in loop body in performance-for-range-copy check.
Summary: The upstream change r336737 make the check too smart to fix the case where loop variable could be used as `const auto&`.
But for the case below, changing to `const auto _` will introduce an unused complier warning.
``` for (auto _ : state) { // no references for _. } ```
This patch omit this case, and it is safe to do it as the case is very rare.
Reviewers: ilya-biryukov, alexfh
Subscribers: xazax.hun, cfe-commits
Differential Revision: https://reviews.llvm.org/D50447
llvm-svn: 339415
show more ...
|
#
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 |
|
#
0ed0febb |
| 10-Jul-2018 |
Shuai Wang <shuaiwang@google.com> |
Use ExprMutationAnalyzer in performance-for-range-copy
Summary: This gives better coverage to the check as ExprMutationAnalyzer is more accurate comparing to isOnlyUsedAsConst.
Majority of wins com
Use ExprMutationAnalyzer in performance-for-range-copy
Summary: This gives better coverage to the check as ExprMutationAnalyzer is more accurate comparing to isOnlyUsedAsConst.
Majority of wins come from const usage of member field, e.g.: for (auto widget : container) { // copy of loop variable if (widget.type == BUTTON) { // const usage only recognized by ExprMutationAnalyzer // ... } }
Reviewers: george.karpenkov
Subscribers: a.sidorin, cfe-commits
Differential Revision: https://reviews.llvm.org/D48854
llvm-svn: 336737
show more ...
|
Revision tags: 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, 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, llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1, llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1, llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
#
2a4c00f2 |
| 03-May-2016 |
Etienne Bergeron <etienneb@google.com> |
[clang-tidy] Cleanup namespace in utils folder.
Summary: This is a step forward cleaning up the namespaces in clang-tidy/utils. There is no behavior change.
Reviewers: alexfh
Subscribers: cfe-comm
[clang-tidy] Cleanup namespace in utils folder.
Summary: This is a step forward cleaning up the namespaces in clang-tidy/utils. There is no behavior change.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19819
llvm-svn: 268356
show more ...
|
#
456177b9 |
| 02-May-2016 |
Etienne Bergeron <etienneb@google.com> |
[clang-tidy] Cleaning namespaces to be more consistant across checkers.
Summary: The goal of the patch is to bring checkers in their appropriate namespace. This path doesn't change any behavior.
Re
[clang-tidy] Cleaning namespaces to be more consistant across checkers.
Summary: The goal of the patch is to bring checkers in their appropriate namespace. This path doesn't change any behavior.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19811
llvm-svn: 268264
show more ...
|
#
adfdc148 |
| 05-Mar-2016 |
Felix Berger <flx@google.com> |
[clang-tidy] Extend UnnecessaryCopyInitialization check to trigger on non-const copies that can be safely converted to const references.
Summary: Move code shared between UnnecessaryCopyInitializati
[clang-tidy] Extend UnnecessaryCopyInitialization check to trigger on non-const copies that can be safely converted to const references.
Summary: Move code shared between UnnecessaryCopyInitialization and ForRangeCopyCheck into utilities files. Add more test cases for UnnecessaryCopyInitialization and disable fixes inside of macros.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D17488
llvm-svn: 262781
show more ...
|
Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3 |
|
#
f4fdc8ab |
| 15-Feb-2016 |
Felix Berger <flx@google.com> |
[clang-tidy] Only invoke ForRangeCopyCheck on expensive-to-copy types.
Summary: Fix oversight not checking the value of the Optional<bool> returned by isExpensiveToCopy().
Reviewers: alexfh
Subscr
[clang-tidy] Only invoke ForRangeCopyCheck on expensive-to-copy types.
Summary: Fix oversight not checking the value of the Optional<bool> returned by isExpensiveToCopy().
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D17064
llvm-svn: 260870
show more ...
|
Revision tags: llvmorg-3.8.0-rc2 |
|
#
5aebfe2e |
| 29-Jan-2016 |
Alexander Kornienko <alexfh@google.com> |
[clang-tidy] ForRangeCopyCheck that warns on and fixes unnecessary copies of loop variables.
Patch by Felix Berger!
Differential revision: http://reviews.llvm.org/D13849
llvm-svn: 259199
|