Revision tags: llvmorg-21-init, llvmorg-19.1.7 |
|
#
f77152d9 |
| 21-Dec-2024 |
Julian Schmidt <git.julian.schmidt@gmail.com> |
[clang-tidy] use specified type verbatim in modernize-use-using fix (#113837)
Previously, the implementation used the printed type, which contains
expanded
macro arguments, deletes comments, and r
[clang-tidy] use specified type verbatim in modernize-use-using fix (#113837)
Previously, the implementation used the printed type, which contains
expanded
macro arguments, deletes comments, and removes function argument names
from the alias declaration. Instead, this check can be more surgical and
use the
actual written type verbatim.
Fixes #33760
Fixes #37846
Fixes #41685
Fixes #83568
Fixes #95716
Fixes #97009
show more ...
|
Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, 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 |
|
#
8ea94b61 |
| 26-Mar-2024 |
Félix-Antoine Constantin <60141446+felix642@users.noreply.github.com> |
[clang-tidy] Improved modernize-use-using by fixing a false-negative (#82947)
The check needs a parent decl to match but if the typedef is in a
function, the parent is a declStmt which is not a dec
[clang-tidy] Improved modernize-use-using by fixing a false-negative (#82947)
The check needs a parent decl to match but if the typedef is in a
function, the parent is a declStmt which is not a decl by itself.
Improved the matcher to match on either a decl or a declstmt and extract
the decl from the stmt in the latter case.
Fixes #72179
show more ...
|
Revision tags: 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 |
|
#
7a48039e |
| 26-Dec-2023 |
Piotr Zegar <me@piotrzegar.pl> |
[clang-tidy] Fix compilation of modernize-use-using check
Fix compilation issue introduced by #69102.
|
#
583a2583 |
| 26-Dec-2023 |
Da-Viper <57949090+Da-Viper@users.noreply.github.com> |
[clang-tidy] Don't replace typedefs in extern c scope (#69102)
Added IgnoreExternC option to modernize-use-using check.
Fixes #35272
|
#
34621aa8 |
| 26-Dec-2023 |
Piotr Zegar <me@piotrzegar.pl> |
Revert "[clang-tidy] Don't replace typedefs in extern c scope (#69102)"
This reverts commit 9dcc66578e12ad8e72c8ae7216122a1125976ac5.
|
#
9dcc6657 |
| 26-Dec-2023 |
Da-Viper <57949090+Da-Viper@users.noreply.github.com> |
[clang-tidy] Don't replace typedefs in extern c scope (#69102)
Added IgnoreExternC option to modernize-use-using check.
Fixes #35272
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3 |
|
#
eef35c28 |
| 05-Oct-2023 |
Qizhi Hu <836744285@qq.com> |
[clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (#67639)
Fix issue 67529, [clang-tidy: modernize-use-using fails when type is
implicitly forward
decl
[clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (#67639)
Fix issue 67529, [clang-tidy: modernize-use-using fails when type is
implicitly forward
declared](https://github.com/llvm/llvm-project/issues/67529)
The problem is that using `Lexer` to get record declaration will lose
the type information when its original type is pointer or reference.
This patch fix this problem by skip adding the tag declaration when it's
only a 'declaration' and not a 'definition'.
Co-authored-by: huqizhi <836744285@qq.com>
show more ...
|
Revision tags: llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0 |
|
#
31ded495 |
| 07-Sep-2023 |
Congcong Cai <congcongcai0907@163.com> |
[clang-tidy][modernize-use-using]fix function pointer typedef correctly (#65558)
Fixed #65055
For normal type, typedef is from typedef to the end of original type,
but for function pointer it is f
[clang-tidy][modernize-use-using]fix function pointer typedef correctly (#65558)
Fixed #65055
For normal type, typedef is from typedef to the end of original type,
but for function pointer it is from typedef to the end.
So it needs to consider alias name length for normal type.
show more ...
|
Revision tags: 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, 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 |
|
#
95d77383 |
| 21-Apr-2022 |
Fabian Wolff <fabian.wolff@alumni.ethz.ch> |
[clang-tidy] Fix behavior of `modernize-use-using` with nested structs/unions
Fixes https://github.com/llvm/llvm-project/issues/50334.
Reviewed By: aaron.ballman
Differential Revision: https://rev
[clang-tidy] Fix behavior of `modernize-use-using` with nested structs/unions
Fixes https://github.com/llvm/llvm-project/issues/50334.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D113804
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, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3 |
|
#
ab2d3ce4 |
| 28-Jan-2021 |
Alexander Kornienko <alexfh@google.com> |
[clang-tidy] Applied clang-tidy fixes. NFC
Applied fixes enabled by the LLVM's .clang-tidy configs. Reverted files where fixes introduced compile errors: clang-tools-extra/clang-tidy/hicpp/NoAssem
[clang-tidy] Applied clang-tidy fixes. NFC
Applied fixes enabled by the LLVM's .clang-tidy configs. Reverted files where fixes introduced compile errors: clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.cpp clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
$ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -fix clang-tools-extra/clang-tidy/ Enabled checks: llvm-else-after-return llvm-header-guard llvm-include-order llvm-namespace-comment llvm-prefer-isa-or-dyn-cast-in-conditionals llvm-prefer-register-over-unsigned llvm-qualified-auto llvm-twine-local misc-definitions-in-headers misc-misplaced-const misc-new-delete-overloads misc-no-recursion misc-non-copyable-objects misc-redundant-expression misc-static-assert misc-throw-by-value-catch-by-reference misc-unconventional-assign-operator misc-uniqueptr-reset-release misc-unused-alias-decls misc-unused-using-decls readability-identifier-naming
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D95614
show more ...
|
Revision tags: 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, 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 |
|
#
db90d315 |
| 21-Jun-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy] Implement storeOptions for checks missing it.
Just adds the storeOptions for Checks that weren't already storing their options.
Reviewed By: aaron.ballman
Differential Revision: https
[clang-tidy] Implement storeOptions for checks missing it.
Just adds the storeOptions for Checks that weren't already storing their options.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D82223
show more ...
|
Revision tags: llvmorg-10.0.1-rc1 |
|
#
145dcef8 |
| 12-Apr-2020 |
Matthias Gehre <gehre.matthias@gmail.com> |
[clang-tidy] modernize-use-using: Fix broken fixit with InjectedClassName
Summary: Before this PR, `modernize-use-using` would transform the typedef in ``` template <int A> struct InjectedClassName
[clang-tidy] modernize-use-using: Fix broken fixit with InjectedClassName
Summary: Before this PR, `modernize-use-using` would transform the typedef in ``` template <int A> struct InjectedClassName { typedef InjectedClassName b; }; ``` into `using b = InjectedClassName<A>;` and ``` template <int> struct InjectedClassNameWithUnnamedArgument { typedef InjectedClassNameWithUnnamedArgument b; }; ``` into `using b = InjectedClassNameWithUnnamedArgument<>;`. The first fixit is surprising because its different than the code before, but the second fixit doesn't even compile.
This PR adds an option to the TypePrinter to print InjectedClassNameType without template parameters (i.e. as written).
Reviewers: aaron.ballman, alexfh, hokein, njames93
Subscribers: xazax.hun, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D77979
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
#
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 ...
|
Revision tags: llvmorg-10.0.0-rc2 |
|
#
6423ae41 |
| 03-Feb-2020 |
Karasev Nikita <cc.tapa@gmail.com> |
Allow modernize-use-using to apply to enumerations as well.
This addresses PR44528.
|
Revision tags: llvmorg-10.0.0-rc1 |
|
#
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-11-init |
|
#
73d93617 |
| 07-Jan-2020 |
Mitchell Balan <mitchell@stellarscience.com> |
[clang-tidy] modernize-use-using uses AST and now supports struct defintions and multiple types in a typedef
Summary: It now handles `typedef`s that include comma-separated multiple types, and handl
[clang-tidy] modernize-use-using uses AST and now supports struct defintions and multiple types in a typedef
Summary: It now handles `typedef`s that include comma-separated multiple types, and handles embedded struct definitions, which previously could not be automatically converted.
For example, with this patch `modernize-use-using` now can convert:
typedef struct { int a; } R_t, *R_p;
to:
using R_t = struct { int a; }; using R_p = R_t*;
`-ast-dump` showed that the `CXXRecordDecl` definitions and multiple `TypedefDecl`s come consecutively in the tree, so `check()` stores information between calls to determine when it is receiving a second or additional `TypedefDecl` within a single `typedef`, or when the current `TypedefDecl` refers to an embedded `CXXRecordDecl` like a `struct`.
Reviewers: alexfh, aaron.ballman
Patch by: poelmanc
Subscribers: riccibruno, sammccall, cfe-commits, aaron.ballman
Tags: clang-tools-extra, clang
Differential Revision: https://reviews.llvm.org/D70270
show more ...
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
782392db |
| 15-Nov-2019 |
Mitchell Balan <mitchell@stellarscience.com> |
[clang-tidy] modernize-use-using work with multi-argument templates
Summary: If clang-tidy's modernize-use-using feature finds any commas that are not within parentheses, it won't create a fix. That
[clang-tidy] modernize-use-using work with multi-argument templates
Summary: If clang-tidy's modernize-use-using feature finds any commas that are not within parentheses, it won't create a fix. That means it won't change lines like: typedef std::pair<int, int> Point; to using Point = std::pair<int, int>; or even: typedef std::map<std::string, Foo> MyMap; typedef std::vector<int,MyCustomAllocator<int>> MyVector;
This patch allows the fix to apply to lines with commas if they are within parentheses or angle brackets that were not themselves within parentheses.
Reviewers: alexfh, hokein, aaron.ballman
Patch by: poelmanc
Subscribers: jonathanmeier, cfe-commits
Tags: #clang, #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D67460
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 |
|
#
b34b6ffa |
| 22-Nov-2018 |
Alexander Kornienko <alexfh@google.com> |
[clang-tidy] Ignore template instantiations in modernize-use-using
The test I'm adding passes without the change due to the deduplication logic in ClangTidyDiagnosticConsumer::take(). However this b
[clang-tidy] Ignore template instantiations in modernize-use-using
The test I'm adding passes without the change due to the deduplication logic in ClangTidyDiagnosticConsumer::take(). However this bug manifests in our internal integration with clang-tidy. I've verified the fix by locally changing LessClangTidyError to consider replacements.
llvm-svn: 347470
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, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2 |
|
#
0854f2dd |
| 08-May-2017 |
Miklos Vajna <vmiklos@vmiklos.hu> |
clang-tidy: add IgnoreMacros option to modernize-use-default-member-init
Summary: And also enable it by default to be consistent with e.g. modernize-use-using.
This helps e.g. when running this che
clang-tidy: add IgnoreMacros option to modernize-use-default-member-init
Summary: And also enable it by default to be consistent with e.g. modernize-use-using.
This helps e.g. when running this check on cppunit client code where the macro is provided by the system, so there is no easy way to modify it.
Reviewers: alexfh, malcolm.parsons
Reviewed By: malcolm.parsons
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D32945
llvm-svn: 302429
show more ...
|
Revision tags: llvmorg-4.0.1-rc1 |
|
#
3a42e73c |
| 02-Apr-2017 |
Krystyna Gajczyk <krystyna.gajczyk@gmail.com> |
Fixes for modernize-use-using check: - removed unnessacary namespaces - added option to print warning in macros - no fix for typedef with array - removed "void" word from functions with 0 parameters
Fixes for modernize-use-using check: - removed unnessacary namespaces - added option to print warning in macros - no fix for typedef with array - removed "void" word from functions with 0 parameters
Differential Revision: https://reviews.llvm.org/D29262
llvm-svn: 299340
show more ...
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2 |
|
#
b7a6ea30 |
| 01-Feb-2017 |
Alexander Kornienko <alexfh@google.com> |
[clang-tidy] Remove debug logging.
llvm-svn: 293763
|
#
4b1dfbbc |
| 24-Jan-2017 |
Alexander Kornienko <alexfh@google.com> |
[clang-tidy] Avoid incorrect fixes in modernize-use-using
Avoid fixes for typedefs with multiple types and for typedefs with struct definitions. Partially addresses http://llvm.org/PR28334
llvm-svn
[clang-tidy] Avoid incorrect fixes in modernize-use-using
Avoid fixes for typedefs with multiple types and for typedefs with struct definitions. Partially addresses http://llvm.org/PR28334
llvm-svn: 292918
show more ...
|