[PATCH] D147908: [clang-tidy] Add support for long double in bugprone-incorrect-roundings

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 512119. PiotrZSL added a comment. Remove local variables Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147908/new/ https://reviews.llvm.org/D147908 Files: clang-tools-extra/clang-tidy/bugprone/IncorrectRoun

[PATCH] D147929: [clang-tidy] Fix handling of UseAssignment option in cppcoreguidelines-prefer-member-initializer

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.cpp:134 + Options.get("UseAssignment", + OptionsView("modernize-use-default-member-init", + Cont

[PATCH] D147924: [clang-tidy] Exclude template instantiations in modernize-use-override

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Problem is that you may have specialization of Bar class wihtout bar base, and that specialization can be local to some compilation unit. Like: template<> struct Bar { void bar(); // function wihout virtual or no function at all. }; And now your fix (overri

[PATCH] D147918: [clang-tidy] Added IgnoreVirtual option to misc-unused-parameters

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 512122. PiotrZSL marked 6 inline comments as done. PiotrZSL added a comment. Review fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147918/new/ https://reviews.llvm.org/D147918 Files: clang-tools-extra/

[PATCH] D147918: [clang-tidy] Added IgnoreVirtual option to misc-unused-parameters

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. CRTP not planed. Not in scope of #55665. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147918/new/ https://reviews.llvm.org/D147918 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D147918: [clang-tidy] Added IgnoreVirtual option to misc-unused-parameters

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG225d255a583e: [clang-tidy] Added IgnoreVirtual option to misc-unused-parameters (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D147906: [clang-tidy] Avoid float compare in bugprone-incorrect-roundings

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 512149. PiotrZSL added a comment. Fix review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147906/new/ https://reviews.llvm.org/D147906 Files: clang-tools-extra/clang-tidy/bugprone/IncorrectRoundin

[PATCH] D147908: [clang-tidy] Add support for long double in bugprone-incorrect-roundings

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 512150. PiotrZSL added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147908/new/ https://reviews.llvm.org/D147908 Files: clang-tools-extra/clang-tidy/bugprone/IncorrectRoundingsCheck.cpp

[PATCH] D147357: [clang-tidy] Add bugprone-optional-value-conversion check

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. As for `takeOptionalValue(std::move(*param));`, it could be added as an configuration option for PassthroughFunctions or UtilityFunctions. I can thing about that, that should be easy to implement. Comment at: clang-tools-extra/docs/clang-tidy/checks

[PATCH] D147955: [clang-tidy] Extend CheckOptions to support grouping checks options

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. There are so many ways of defining check configurations, and I never heard of them. Maybe some separate section in documentation is needed for them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147955/new/ https://review

[PATCH] D131319: [clang-tidy] Update llvm-prefer-isa-or-dyn-cast-in-conditionals with new syntax

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.cpp:39 varDecl(hasInitializer( callExpr(allOf(unless(isMacroID()), unless(cxxMemberCallExpr()), callee(name

[PATCH] D147779: [clang-tidy] Fix hungarian notation failed to indicate the number of asterisks in check-clang-extra-clang-tidy-checkers-readability

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. arc land should work, I usually use arc patch --nobranch to check things before committing and then git push. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147779/new/ https://reviews.llvm.org/D147779 ___

[PATCH] D146921: [clang-tidy] Implement cppcoreguidelines F.19

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/forwarding-reference-param-not-forwarded.cpp:138 + +} // namespace negative_cases ccotter wrote: > ccotter wrote: > > PiotrZSL wrote: > > > what about when s

[PATCH] D147779: [clang-tidy] Fix hungarian notation failed to indicate the number of asterisks in check-clang-extra-clang-tidy-checkers-readability

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG65d20e329690: [clang-tidy] Fix hungarian notation failed to indicate the number of asterisks… (authored by dougpuob, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D147946: [clang-tidy] support nested inline namespace in c++20 for modernize-concat-nested-namespaces

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. LGTM, just some style comments. Comment at: clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:84-86 + Str.append(ND->getName()); +} else +

[PATCH] D146922: [clang-tidy] Fix false positve for defaulted move constructor in performance-noexcept-move-constructor

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. Any plans in delivering this ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146922/new/ https://reviews.llvm.org/D146922 ___ cfe-commits mailin

[PATCH] D138777: [clang-tidy] Add check bugprone-multiple-new-in-one-expression.

2023-04-11 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/MultipleNewInOneExpressionCheck.cpp:91 + ExceptionType, ExceptionReferenceType))); + auto BadAllocCatchingTryBlock = cxxTryStmt(hasHandlerFor(CatchBadAllocType

[PATCH] D147924: [clang-tidy] Exclude template instantiations in modernize-use-override

2023-04-11 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 512529. PiotrZSL edited the summary of this revision. PiotrZSL added a comment. Introduce option IgnoreTemplateInstantiations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147924/new/ https://reviews.llvm.org

[PATCH] D147357: [clang-tidy] Add bugprone-optional-value-conversion check

2023-04-11 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 512559. PiotrZSL marked 3 inline comments as done. PiotrZSL added a comment. Add fixes, add suport for std:move, fixed operator*() calls, added more tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147357/ne

[PATCH] D147357: [clang-tidy] Add bugprone-optional-value-conversion check

2023-04-11 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL planned changes to this revision. PiotrZSL added a comment. TODO: Fix pointers, Add more tests, consider free standing value extraction functions like boost::get Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147357/new/ https://reviews.ll

[PATCH] D148314: [clang-tidy] Improved hungarian notation regression test at post-commit review

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL requested changes to this revision. PiotrZSL added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:264-267 +- Improved readability for hungarian notation in + :doc:`readability-identifier-naming + ` by

[PATCH] D148314: [clang-tidy] Improved hungarian notation regression test at post-commit review

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. And you forget to attach changes in unit tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148314/new/ https://reviews.llvm.org/D148314 ___ cfe-commits mailing list cfe-commi

[PATCH] D148318: [clang-tidy] Add `performance-avoid-endl` check

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Consider extending this check to suport also std::ends, maybe name it performance-avoid-endl-ends. Comment at: clang-tools-extra/clang-tidy/performance/DontUseEndlCheck.cpp:26 + callee(cxxMethodDecl(ofClass( + hasAnyName("::std::

[PATCH] D148318: [clang-tidy] Add `performance-avoid-endl` check

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/AvoidEndlCheck.cpp:1 +//===--- AvoidEndlCheck.cpp - clang-tidy ===// +// rename script got problem with this comment, you may need to align it man

[PATCH] D148340: [clang-tidy] Apply cppcoreguidelines-avoid-capture-default-when-capturin-this only to by-value capture default

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp:55 +AvoidByValueCaptureDefaultWhenCapturingThisCheck>( + "cppcoreguidelines-avoid-by-value-capture-default-when-capturing-this"); Check

[PATCH] D148314: [clang-tidy] Improved hungarian notation regression test at post-commit review

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. Change in tests is ok, change in release notes not needed (please remove). Change title into [clang-tidy][NFC] Improved ... NFC - Non Functional Change Repository: rG LLVM Github Monore

[PATCH] D148354: [clang-tidy] Remove reference to Visual studio native plugin

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. LGTM, as I undestand you don't have commit access, i will push this... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148354/new/ https://reviews.llvm.org/D148354 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D148314: [clang-tidy][NFC] Improved hungarian notation regression test at post-commit review

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. I will push into repository this in a moment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148314/new/ https://reviews.llvm.org/D148314 ___

[PATCH] D148340: [clang-tidy] Apply cppcoreguidelines-avoid-capture-default-when-capturin-this only to by-value capture default

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp:55 +AvoidByValueCaptureDefaultWhenCapturingThisCheck>( + "cppcoreguidelines-avoid-by-value-capture-default-when-capturing-this"); Check

[PATCH] D148354: [clang-tidy][NFC] Remove reference to Visual studio native plugin

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. I see you uploaded this path without author attached, should I push this as "Jorge Pinto Sousa " ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148354/new/ https://reviews.llvm.org/D148354 ___ cfe-commits mailing l

[PATCH] D146922: [clang-tidy] Fix false positve for defaulted move constructor in performance-noexcept-move-constructor

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a reviewer: carlosgalvezp. PiotrZSL added a comment. I'm pushing this as it looks fine, and I don't see any reason to block this. @carlosgalvezp Fell free to look into this in some free time if you see any bugs/issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D146922: [clang-tidy] Fix false positve for defaulted move constructor in performance-noexcept-move-constructor

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5abe338f2a7f: [clang-tidy] Fix false positve for defaulted move constructor in performance… (authored by AMS21, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D148314: [clang-tidy][NFC] Improved hungarian notation regression test at post-commit review

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9f3995c051fc: [clang-tidy][NFC] Improved hungarian notation regression test at post-commit… (authored by dougpuob, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148354: [clang-tidy][NFC] Remove reference to Visual studio native plugin

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe2919f8f49ab: [clang-tidy][NFC] Remove reference to Visual studio native plugin (authored by sousajo, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D145865: [clang-tidy] Multiple fixes to bugprone-exception-escape

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513691. PiotrZSL added a comment. Ping + Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145865/new/ https://reviews.llvm.org/D145865 Files: clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.c

[PATCH] D146842: [clang-tidy] Fix crash when handling invalid config values

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513692. PiotrZSL added a comment. Ping + Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146842/new/ https://reviews.llvm.org/D146842 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clang-tools-ext

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513693. PiotrZSL added a comment. Ping + Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/ https://reviews.llvm.org/D146368 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt cl

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513694. PiotrZSL added a comment. Ping + Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt clang-too

[PATCH] D130665: [clang-tidy] Fix false negative in readability-convert-member-functions-to-static

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. Looks good, release notes need to be corrected (order of checks) (even that it apply without conflicts) and could land. Test properly fail without fix. Repository: rG LLVM Github Monore

[PATCH] D148340: [clang-tidy] Apply cppcoreguidelines-avoid-capture-default-when-capturin-this only to by-value capture default

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. Just some minor issues in documentation. To be honest for me this check still looks too strict, for example it will warn when we capture `this` explicitly, and we don't use any class fields

[PATCH] D148418: [clang-tidy] Fix typedefs handling in bugprone-dangling-handle

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Using 'hasUnqualifiedDe

[PATCH] D148340: [clang-tidy] Apply cppcoreguidelines-avoid-capture-default-when-capturin-this only to by-value capture default

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp:55 +AvoidByValueCaptureDefaultWhenCapturingThisCheck>( + "cppcoreguidelines-avoid-by-value-capture-default-when-capturing-this"); Check

[PATCH] D148340: [clang-tidy] Apply cppcoreguidelines-avoid-capture-default-when-capturin-this only to by-value capture default

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp:55 +AvoidByValueCaptureDefaultWhenCapturingThisCheck>( + "cppcoreguidelines-avoid-by-value-capture-default-when-capturing-this"); Check

[PATCH] D147081: [clang-tidy] Fix issues in bugprone-assert-side-effect

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. You right, I copied wrong issue id, should be #31825. I do not plan to split this review. It's simply too big effort to do that, and then maintain multiple reviews that have dependencies on each other, they they all are related to same check. Repository: rG LLVM Gi

[PATCH] D147906: [clang-tidy] Avoid float compare in bugprone-incorrect-roundings

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa73b87b8bd47: [clang-tidy] Avoid float compare in bugprone-incorrect-roundings (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147906/n

[PATCH] D147908: [clang-tidy] Add support for long double in bugprone-incorrect-roundings

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaa1642f6cc4a: [clang-tidy] Add support for long double in bugprone-incorrect-roundings (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D147924: [clang-tidy] Exclude template instantiations in modernize-use-override

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513866. PiotrZSL marked 2 inline comments as done. PiotrZSL added a comment. Remove not needed comments from tests, and added new comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147924/new/ https://revi

[PATCH] D147924: [clang-tidy] Exclude template instantiations in modernize-use-override

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513871. PiotrZSL marked an inline comment as done. PiotrZSL added a comment. Remove of fix start/end marker. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147924/new/ https://reviews.llvm.org/D147924 Files:

[PATCH] D147924: [clang-tidy] Exclude template instantiations in modernize-use-override

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/use-override-templates.cpp:46 + // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override] + // CHECK-F

[PATCH] D148418: [clang-tidy] Fix typedefs handling in bugprone-dangling-handle

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked an inline comment as done. PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/dangling-handle.cpp:55-56 - operator basic_string_view() const noexcept; + typedef basic_string_view str_view; + operator str_view() co

[PATCH] D147924: [clang-tidy] Exclude template instantiations in modernize-use-override

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9556409957bb: [clang-tidy] Exclude template instantiations in modernize-use-override (authored by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D147924?vs=513871&id=513880#toc Repository

[PATCH] D148418: [clang-tidy] Fix typedefs handling in bugprone-dangling-handle

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. PiotrZSL marked an inline comment as done. Closed by commit rG35f466eb14b7: [clang-tidy] Fix typedefs handling in bugprone-dangling-handle (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D146842: [clang-tidy] Fix crash when handling invalid config values

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidy.h:61-69 struct NamesAndOptions { llvm::StringSet<> Names; llvm::StringSet<> Options; + std::vector Errors; }; NamesAndOptions njames93 wrote: > I don't think this is th

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked 4 inline comments as done. PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/HeaderIncludeCycleCheck.cpp:134-135 +do { + if (CurrentIt->Name.empty()) +continue; + njames93 wrote: > Is this a case that

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513886. PiotrZSL marked 3 inline comments as done. PiotrZSL added a comment. Small redesign (review comments) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files:

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513896. PiotrZSL marked an inline comment as done. PiotrZSL added a comment. Fix one small nit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9ece8753d5e6: [clang-tidy] Add misc-header-include-cycle check (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D146842: [clang-tidy] Fix crash when handling invalid config values

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D146842#4271089 , @njames93 wrote: > I think this should be split up into 2 separate patches, one for each of the > proposed changes and each can be reviewed on their own. I don't plan to split this. Repository: rG LLVM

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513898. PiotrZSL added a comment. Small changes remove, file name Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-extra/clang-tidy/misc/CMakeLis

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. To be honest I have no idea why it failed, simply because there is CHECK-MESSAGES for that log. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 _

[PATCH] D148318: [clang-tidy] Add `performance-avoid-endl` check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/AvoidEndlEndsCheck.cpp:28 + declRefExpr( + to(namedDecl(hasAnyName("endl", "ends")).bind("decl"))) + .bind("expr", njames93 wro

[PATCH] D144036: [clang-tidy] Add bugprone-non-zero-enum-to-bool-conversion check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513917. PiotrZSL added a comment. Fix check description in source file (white spaces, sync it with release notes) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144036/new/ https://reviews.llvm.org/D144036 Fil

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL planned changes to this revision. PiotrZSL added a comment. TODO: Split tests into multiple files (to isolate issue). If possible remove usage of FileCheck. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.o

[PATCH] D144036: [clang-tidy] Add bugprone-non-zero-enum-to-bool-conversion check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513923. PiotrZSL added a comment. Rebase due to broken baseline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144036/new/ https://reviews.llvm.org/D144036 Files: clang-tools-extra/clang-tidy/bugprone/Bugpro

[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Missing ReleaseNote entry. Comment at: clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp:43 + // Consider only functions with a external and visible declaration. + if (auto *MemberDecl = dyn_cast(FuncDecl)) +if (MemberDecl->getPar

[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. And missing test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148444/new/ https://reviews.llvm.org/D148444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL requested changes to this revision. PiotrZSL added a comment. This revision now requires changes to proceed. Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148444/new/ https://reviews.llvm.org/D148444 _

[PATCH] D144036: [clang-tidy] Add bugprone-non-zero-enum-to-bool-conversion check

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513973. PiotrZSL added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144036/new/ https://reviews.llvm.org/D144036 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp clan

[PATCH] D144036: [clang-tidy] Add bugprone-non-zero-enum-to-bool-conversion check

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3bf322e69d5c: [clang-tidy] Add bugprone-non-zero-enum-to-bool-conversion check (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144036/n

[PATCH] D148458: [clang-tidy][NFC] Split bugprone-exception-escape tests

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Split tests files into noexcept and throw(). This is prepa

[PATCH] D147929: [clang-tidy] Fix handling of UseAssignment option in cppcoreguidelines-prefer-member-initializer

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb34ca0851a52: [clang-tidy] Fix handling of UseAssignment option in cppcoreguidelines-prefer… (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D148461: [clang-tidy] Support C++17/20 in bugprone-exception-escape

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp. Herald added a subscriber: xazax.hun. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Added support for C++

[PATCH] D148462: [clang-tidy] Ignore declarations in bugprone-exception-escape

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp. Herald added a subscriber: xazax.hun. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Warnings will now onl

[PATCH] D148458: [clang-tidy][NFC] Split bugprone-exception-escape tests

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape.cpp:267 const derived *p = &d; -throw p; } catch(base *) { carlosgalvezp wrote: > I run into this often as well. If you don't want to ge

[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. From functional point of view it's looking good. Comment at: clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp:42 + // Consider only functions with an

[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Fix Linux build before committing & resolve all comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148444/new/ https://reviews.llvm.org/D148444 ___ cfe-commits mailing list

[PATCH] D144748: [clang-tidy] Add bugprone-empty-catch check

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked an inline comment as done. PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EmptyCatchCheck.cpp:100 +void EmptyCatchCheck::check(const MatchFinder::MatchResult &Result) { + const auto *MatchedCatchStmt = Result.Nodes.getNodeAs("ca

[PATCH] D144748: [clang-tidy] Add bugprone-empty-catch check

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked an inline comment as done. PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EmptyCatchCheck.cpp:100 +void EmptyCatchCheck::check(const MatchFinder::MatchResult &Result) { + const auto *MatchedCatchStmt = Result.Nodes.getNodeAs("ca

[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/llvmlibc/inline-function-decl.hpp:66 +// CHECK-MESSAGES-NOT: :[[@LINE+3]]:3: warning: 'operator void (*)()' must be tagged with the LIBC_INLINE macro; the macro should be placed at the beginn

[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Rebase code, this will fix a build. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148444/new/ https://reviews.llvm.org/D148444 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D144748: [clang-tidy] Add bugprone-empty-catch check

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked 4 inline comments as done. PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/empty-catch.rst:147-153 +.. option:: IgnoreCatchWithKeywords + +This option can be used to ignore specific catch statements containing +

[PATCH] D144748: [clang-tidy] Add bugprone-empty-catch check

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 514000. PiotrZSL added a comment. Add getCheckTraversalKind, format tests, fix some review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144748/new/ https://reviews.llvm.org/D144748 Files: clang-to

[PATCH] D148460: [clang-tidy] Add alias cppcoreguidelines-use-default-member-init

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148460/new/ https://reviews.llvm.org/D148460 ___

[PATCH] D148461: [clang-tidy] Support C++17/20 in bugprone-exception-escape

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:160-162 +// FIXME: Two function pointers can differ in 'noexcept', but they still +// should be considered to be same, now this triggers false-positive because +// Ty

[PATCH] D148462: [clang-tidy] Ignore declarations in bugprone-exception-escape

2023-04-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. @isuckatcs No it were not fine, check function were executed, ExceptionAnalyzer created only to bail out due to nullptr getBody for functions with only declaration. For functions with separate declaration and definition entire analysis is executed twice. simply because

[PATCH] D148462: [clang-tidy] Ignore declarations in bugprone-exception-escape

2023-04-17 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. @isuckatcs "Technically the exception is propagated through the function until a handler is found that catches it." No because indirectly_recursive called from recursion_helper is noexcept, so there will be std::terminate called. "Also we have cross translation unit an

[PATCH] D148462: [clang-tidy] Ignore declarations in bugprone-exception-escape

2023-04-17 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. @isuckatcs "Note that this particular warning is reported for the function and not for something inside the definition." Function declaration is not a function. A function declaration is a statement in programming languages that declares the existence of a function, i

[PATCH] D150126: [clang-tidy][WIP] Set traversal scope to prevent analysis in headers

2023-05-21 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. I love an idea, but i'm afraid that it may impact checks that build some internal database, like misc-confusable-identifiers or misc-unused-using-decls. Probably some of those checks would need to be rewrite to use some own visitor. And probably we should have access t

[PATCH] D151051: [clang-tidy] Optimize misc-confusable-identifiers

2023-05-21 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp. Herald added a subscriber: xazax.hun. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Main performance issu

[PATCH] D151133: [clang-tidy] Ignore implicit code in bugprone-branch-clone

2023-05-22 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp. Herald added a subscriber: xazax.hun. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Implicit code like, t

[PATCH] D147889: [clang-tidy] Improve bugprone-branch-clone with support for fallthrough attribute

2023-05-22 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 524419. PiotrZSL added a comment. Rebase, Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147889/new/ https://reviews.llvm.org/D147889 Files: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp

[PATCH] D148461: [clang-tidy] Support C++17/20 in bugprone-exception-escape

2023-05-22 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148461/new/ https://reviews.llvm.org/D148461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D147357: [clang-tidy] Add bugprone-optional-value-conversion check

2023-05-22 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147357/new/ https://reviews.llvm.org/D147357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-05-22 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/ https://reviews.llvm.org/D146368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D151192: [clang-tidy] have bugprone-unchecked-optional-access check boost::optional usage

2023-05-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL requested changes to this revision. PiotrZSL added a comment. This revision now requires changes to proceed. - Add some simple test (positive and negative), just to prove that it's detected - Add release note entry - Add entry in check documentation, that boost::optional may be partially

[PATCH] D151133: [clang-tidy] Ignore implicit code in bugprone-branch-clone

2023-05-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 524764. PiotrZSL added a comment. Add positive test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151133/new/ https://reviews.llvm.org/D151133 Files: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h

[PATCH] D147889: [clang-tidy] Improve bugprone-branch-clone with support for fallthrough attribute

2023-05-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 524769. PiotrZSL marked 2 inline comments as done. PiotrZSL added a comment. Correct review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147889/new/ https://reviews.llvm.org/D147889 Files: clang-t

[PATCH] D150602: [clang-tidy] Move formatDereference to FixitHintUtils

2023-05-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. LGTM, code compiles locally, restarted CI job (maybe will pass). Add [NFC] to change title before committing as this changes does not impact functionality. Comment at: c

[PATCH] D148461: [clang-tidy] Support C++17/20 in bugprone-exception-escape

2023-05-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 524817. PiotrZSL edited the summary of this revision. PiotrZSL added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148461/new/ https://reviews.llvm.org/D148461 Files: clang-tools-extra/cla

[PATCH] D148461: [clang-tidy] Support C++17/20 in bugprone-exception-escape

2023-05-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 524820. PiotrZSL added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148461/new/ https://reviews.llvm.org/D148461 Files: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp clang-to

<    2   3   4   5   6   7   8   9   >