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 |
|
#
dd23b347 |
| 23-Jul-2024 |
Clement Courbet <courbet@google.com> |
[clang-tidy][performance-unnecessary-value-param] Make `handleMoveFix` virtual (#99867)
... so that downstream checks can override behaviour to do additional
processing.
Refactor the rest of the
[clang-tidy][performance-unnecessary-value-param] Make `handleMoveFix` virtual (#99867)
... so that downstream checks can override behaviour to do additional
processing.
Refactor the rest of the logic to `handleConstRefFix` (which is also
`virtual`).
This is otherwise and NFC.
This is similar to https://github.com/llvm/llvm-project/pull/73921 but
for `performance-unnecessary-value-param`.
show more ...
|
Revision tags: llvmorg-20-init |
|
#
8e42e0d2 |
| 15-Jul-2024 |
Vitaly Goldshteyn <VitalyGoldstein@gmail.com> |
[clang-tidy] Allow unnecessary-value-param to match templated functions including lambdas with auto. (#97767)
Clang-Tidy unnecessary-value-param value param will be triggered for
templated function
[clang-tidy] Allow unnecessary-value-param to match templated functions including lambdas with auto. (#97767)
Clang-Tidy unnecessary-value-param value param will be triggered for
templated functions if at least one instantiontion with expensive to
copy type is present in translation unit.
It is relatively common mistake to write lambda functions with auto
arguments for expensive to copy types.
show more ...
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5 |
|
#
f40f4fce |
| 17-Apr-2024 |
Congcong Cai <congcongcai0907@163.com> |
[clang analysis] ExprMutationAnalyzer support recursive forwarding reference (#88843)
Reapply for #88765.
Partially fixes: #60895.
|
Revision tags: 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, 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 |
|
#
e125e6c4 |
| 30-Oct-2022 |
Kazu Hirata <kazu@google.com> |
[clang-tools-extra] Use llvm::find (NFC)
|
Revision tags: 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 |
|
#
c98b3a8c |
| 30-May-2022 |
Sockke <liuke.gehry@bytedance.com> |
Fix `performance-unnecessary-value-param` for template specialization
The checker missed a check for parameter type of primary template of specialization template and this could cause build breakage
Fix `performance-unnecessary-value-param` for template specialization
The checker missed a check for parameter type of primary template of specialization template and this could cause build breakages.
Reviewed By: aaron.ballman, flx
Differential Revision: https://reviews.llvm.org/D116593
show more ...
|
Revision tags: llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2 |
|
#
b859c39c |
| 16-Apr-2022 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy] Add a Standalone diagnostics mode to clang-tidy
Adds a flag to `ClangTidyContext` that is used to indicate to checks that fixes will only be applied one at a time. This is to indicate t
[clang-tidy] Add a Standalone diagnostics mode to clang-tidy
Adds a flag to `ClangTidyContext` that is used to indicate to checks that fixes will only be applied one at a time. This is to indicate to checks that each fix emitted should not depend on any other fixes emitted across the translation unit. I've currently implemented the `IncludeInserter`, `LoopConvertCheck` and `PreferMemberInitializerCheck` to use these support these modes.
Reasoning behind this is in use cases like `clangd` it's only possible to apply one fix at a time. For include inserter checks, the include is only added once for the first diagnostic that requires it, this will result in subsequent fixes not having the included needed.
A similar issue is seen in the `PreferMemberInitializerCheck` where the `:` will only be added for the first member that needs fixing.
Fixes emitted in `StandaloneDiagsMode` will likely result in malformed code if they are applied all together, conversely fixes currently emitted may result in malformed code if they are applied one at a time. For this reason invoking `clang-tidy` from the binary will always with `StandaloneDiagsMode` disabled, However using it as a library its possible to select the mode you wish to use, `clangd` always selects `StandaloneDiagsMode`.
This is an example of the current behaviour failing ```lang=c++ struct Foo { int A, B; Foo(int D, int E) { A = D; B = E; // Fix Here } }; ``` Incorrectly transformed to: ```lang=c++ struct Foo { int A, B; Foo(int D, int E), B(E) { A = D; // Fix Here } }; ``` In `StandaloneDiagsMode`, it gets transformed to: ```lang=c++ struct Foo { int A, B; Foo(int D, int E) : B(E) { A = D; // Fix Here } }; ```
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D97121
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, 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 |
|
#
1a721b6a |
| 26-Feb-2021 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy][NFC] Tweak some generation of diag messages
Fix up cases where diag is called by piecing together a string in favour of placeholders. Fix up cases where select could be used instead of
[clang-tidy][NFC] Tweak some generation of diag messages
Fix up cases where diag is called by piecing together a string in favour of placeholders. Fix up cases where select could be used instead of duplicating the message for sake of 1 word difference.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D97488
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 |
|
#
fdfe324d |
| 28-Sep-2020 |
Alexander Kornienko <alexfh@google.com> |
[clang-tidy] IncludeInserter: allow <> in header name
This adds a pair of overloads for create(MainFile)?IncludeInsertion methods that use the presence of the <> in the file name to control whether
[clang-tidy] IncludeInserter: allow <> in header name
This adds a pair of overloads for create(MainFile)?IncludeInsertion methods that use the presence of the <> in the file name to control whether the #include directive will use angle brackets or quotes. Motivating examples: https://reviews.llvm.org/D82089#inline-789412 and https://github.com/llvm/llvm-project/blob/master/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp#L433
The overloads with the IsAngled parameter can be removed after the users are updated.
Update usages of createIncludeInsertion.
Update (almost all) usages of createMainFileIncludeInsertion.
Reviewed By: hokein
Differential Revision: https://reviews.llvm.org/D85666
show more ...
|
Revision tags: llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1 |
|
#
13c9bbc2 |
| 27-Jul-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy] Refactor IncludeInserter
Simplified how `IncludeInserter` is used in Checks by abstracting away the SourceManager and PPCallbacks inside the method `registerPreprocessor`. Changed check
[clang-tidy] Refactor IncludeInserter
Simplified how `IncludeInserter` is used in Checks by abstracting away the SourceManager and PPCallbacks inside the method `registerPreprocessor`. Changed checks that use `IncludeInserter` to no longer use a `std::unique_ptr`, instead the IncludeInserter is just a member of the class thats initialized with an `IncludeStyle`. Saving an unnecessary allocation.
This results in the removal of the field `IncludeSorter::IncludeStyle` from the checks, as its wrapped in the `IncludeInserter`. No longer need to create an instance of the `IncludeInserter` in the registerPPCallbacks, now that method only needs to contain: ``` Inserter.registerPreprocessor(PP); ``` Also added a helper method to `IncludeInserter` called `createMainFileInclusionInsertion`, purely sugar but does better express intentions.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D83680
show more ...
|
Revision tags: llvmorg-12-init |
|
#
c3bdc981 |
| 11-Jul-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy] Reworked enum options handling(again)
Reland b9306fd after fixing the issue causing mac builds to fail unittests.
Following on from D77085, I was never happy with the passing a mapping
[clang-tidy] Reworked enum options handling(again)
Reland b9306fd after fixing the issue causing mac builds to fail unittests.
Following on from D77085, I was never happy with the passing a mapping to the option get/store functions. This patch addresses this by using explicit specializations to handle the serializing and deserializing of enum options.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D82188
show more ...
|
Revision tags: llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3 |
|
#
e34523c8 |
| 29-Jun-2020 |
Nathan James <n.james93@hotmail.co.uk> |
Revert "[clang-tidy] relanding b9306fd"
This reverts commit 37cc4fa2eaa3d03ca8cd4947eb0d4c60e3c9b45c. More investigation needed
|
#
37cc4fa2 |
| 29-Jun-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy] relanding b9306fd
Added some sanity checks to figure out the cause of a (seemingly unrelated) test failure on mac. These can be removed should no issues arise on that platform again.
|
#
8f73c443 |
| 29-Jun-2020 |
Nico Weber <thakis@chromium.org> |
Revert "[clang-tidy] Reworked enum options handling(again)"
This reverts commit b9306fd042ce1c11d84f05d2124dfdc65b8331fe and follow-up 42a51587c79a673045aec3586f4070630e5e7af3.
It seems to build ch
Revert "[clang-tidy] Reworked enum options handling(again)"
This reverts commit b9306fd042ce1c11d84f05d2124dfdc65b8331fe and follow-up 42a51587c79a673045aec3586f4070630e5e7af3.
It seems to build check-clang-tools on macOS, see comments on https://reviews.llvm.org/D82188
show more ...
|
#
b9306fd0 |
| 28-Jun-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy] Reworked enum options handling(again)
Following on from D77085, I was never happy with the passing a mapping to the option get/store functions. This patch addresses this by using explic
[clang-tidy] Reworked enum options handling(again)
Following on from D77085, I was never happy with the passing a mapping to the option get/store functions. This patch addresses this by using explicit specializations to handle the serializing and deserializing of enum options.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D82188
show more ...
|
Revision tags: llvmorg-10.0.1-rc2 |
|
#
c3b4486a |
| 19-Jun-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[NFC] Simplify IncludeInsertions appending to diagnostics
|
Revision tags: 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 ...
|
#
9dff9ecd |
| 07-Apr-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy] Change checks that take enum configurations to use a new access method.
Summary: Change all checks that take enums as configuration to use enum specific methods in `ClangTidyCheck::Opti
[clang-tidy] Change checks that take enum configurations to use a new access method.
Summary: Change all checks that take enums as configuration to use enum specific methods in `ClangTidyCheck::OptionsView`.
Reviewers: aaron.ballman, alexfh
Reviewed By: aaron.ballman
Subscribers: wuzish, nemanjai, kbarton, arphaman, xazax.hun, cfe-commits
Tags: #clang, #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D76606
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 ...
|
#
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 |
|
#
1c705d9c |
| 14-Aug-2019 |
Jonas Devlieghere <jonas@devlieghere.com> |
[clang-tools-extra] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical r
[clang-tools-extra] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo.
Differential revision: https://reviews.llvm.org/D66259
llvm-svn: 368944
show more ...
|