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

2023-06-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 533952. PiotrZSL added a comment. This revision is now accepted and ready to land. 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/

[PATCH] D153639: [clang-tidy] Document modernize-raw-string-literal check options

2023-06-23 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. Add missing documentati

[PATCH] D153639: [clang-tidy] Document modernize-raw-string-literal check options

2023-06-23 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb0f6fd24dc12: [clang-tidy] Document modernize-raw-string-literal check options (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153639/n

[PATCH] D153298: [clang-tidy] Extend bugprone-exception-escape diagnostics

2023-06-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:390 for (const Type *T : TypesToDelete) -ThrownExceptions.erase(T); +ThrownExceptions.erase({T, SourceLocation()}); isuckatcs wrote: > PiotrZSL wrote

[PATCH] D153458: [clang-tidy] Model noexcept more properly in bugprone-exception-escape

2023-06-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:319 +static bool cannotThrow(const FunctionDecl *Func) { + const auto *FunProto = Func->getType()->getAs(); isuckatcs wrote: > Put this in the anonymous namesp

[PATCH] D153423: [clang-tidy] Allow explicit throwing in bugprone-exception-escape for special functions

2023-06-23 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/exception-escape.rst:14 * ``swap()`` functions -* Functions marked with ``throw()`` or ``noexcept`` +* Functions marked with ``throw()``, ``n

[PATCH] D153423: [clang-tidy] Allow explicit throwing in bugprone-exception-escape for special functions

2023-06-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 534059. PiotrZSL marked an inline comment as done. PiotrZSL added a comment. Herald added a project: clang. Review fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153423/new/ https://reviews.llvm.org/D1534

[PATCH] D153298: [clang-tidy] Extend bugprone-exception-escape diagnostics

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 534169. PiotrZSL added a comment. Use std::map Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153298/new/ https://reviews.llvm.org/D153298 Files: clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cp

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

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf3aa6cc0f5d5: [clang-tidy] Add misc-header-include-cycle check (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://rev

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

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 534183. PiotrZSL added a comment. Reorder warnigns & copy .cpp file to Output 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/m

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

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7f6e0052a97f: [clang-tidy] Add misc-header-include-cycle check (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://rev

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-print.rst:117 + +.. option:: PrintFunction + mikecrowe wrote: > PiotrZSL wrote: > > mikecrowe wrote: > > > Is `PrintFunction` (and the soon-to-arrive `PrintlnF

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

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG67e05d380c22: [clang-tidy] Fix false negative in readability-convert-member-functions-to… (authored by njames93, committed by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D130665?vs=448

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseStdPrintCheck.cpp:37 + + if (PrintfLikeFunctions.empty() && FprintfLikeFunctions.empty()) { +PrintfLikeFunctions.push_back("::printf"); tho

[PATCH] D153716: [ASTMatchers] Add argumentCountAtLeast narrowing matcher

2023-06-25 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, Personally probably I would extract this to this level, and I would leave it private to a check, but it's fine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. Consider delivering this check. I do not think that it will become much better with more refactoring. Comment at: clang-tools-extra/clang-tidy/utils/FormatStringConverter.cpp:202-203 + assert(FormatExpr); + if (!Form

[PATCH] D153716: [ASTMatchers] Add argumentCountAtLeast narrowing matcher

2023-06-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. NOTE: Registry.cpp were not changed, I will add it there during commit if all tests locally pass. If tests fail, I will just add this matcher as private in clang-tidy check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D153716: [ASTMatchers] Add argumentCountAtLeast narrowing matcher

2023-06-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 534363. PiotrZSL added a comment. Rebase + Added change to Registry.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153716/new/ https://reviews.llvm.org/D153716 Files: clang/docs/LibASTMatchersReference.h

[PATCH] D153716: [ASTMatchers] Add argumentCountAtLeast narrowing matcher

2023-06-25 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2ae8a4a17888: [ASTMatchers] Add argumentCountAtLeast narrowing matcher (authored by mikecrowe, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL reopened this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. @thakis Thank you. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print.cpp:9-15 +#include +#include +#include +// CHECK-FIXES: #include +#

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/cstddef:12 -typedef __typeof__(sizeof(0)) size_t; +#include "stddef.h" We shouldn't include this stddef.h, it's being included from system headers. Reposit

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Test is failing: https://lab.llvm.org/buildbot/#/builders/230/builds/14939/steps/6/logs/FAIL__Clang_Tools__use-std-print_cpp https://lab.llvm.org/buildbot/#/builders/245/builds/10266 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D149280#4450418 , @mikecrowe wrote: > Despite the fact that I've worked on what became this check for about two > years, now that it's landed I've suddenly spotted a significant flaw: > `printf` returns the number of charact

[PATCH] D153860: [clang-tidy] Fix modernize-use-std-print check when return value used

2023-06-27 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 Comment at: clang-tools-extra/clang-tidy/modernize/UseStdPrintCheck.cpp:73-95 +static clang::ast_matchers::StatementMatcher +unusedReturnValue(clang::ast_matchers::S

[PATCH] D153860: [clang-tidy] Fix modernize-use-std-print check when return value used

2023-06-27 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3e12b2e207cf: [clang-tidy] Fix modernize-use-std-print check when return value used (authored by mikecrowe, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D153860: [clang-tidy] Fix modernize-use-std-print check when return value used

2023-06-29 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG09ed2102eab5: [clang-tidy] Fix modernize-use-std-print check when return value used (authored by mikecrowe, committed by P

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

2023-03-29 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D146922#4231317 , @AMS21 wrote: > In D146922#4227832 , @PiotrZSL > wrote: > >> Try refactoring code a lite bit, check suggestions, add tests for typedefs, >> and inheritance from tem

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

2023-03-29 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/performance/noexcept-move-constructor.cpp:278 + OK22 &operator=(OK22 &&) = default; +}; add test with 2 base classes (no templates). Repository: rG LLVM Github Monorepo

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

2023-03-29 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionSpecAnalyzer.h:79 + + std::map FunctionCache; +}; std::unordered_map, or try to check if llvm doesn't have something better with some pre-allocation. Repository: rG LLVM

[PATCH] D146875: [clang-tidy] Fix example provided by add_new_check.py

2023-03-29 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 509410. PiotrZSL added a comment. Move fix from note to warning Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146875/new/ https://reviews.llvm.org/D146875 Files: clang-tools-extra/clang-tidy/add_new_check.p

[PATCH] D146875: [clang-tidy] Fix example provided by add_new_check.py

2023-03-29 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 509411. PiotrZSL added a comment. Remove change added by mistake Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146875/new/ https://reviews.llvm.org/D146875 Files: clang-tools-extra/clang-tidy/add_new_check.

[PATCH] D146875: [clang-tidy] Fix example provided by add_new_check.py

2023-03-29 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 509412. PiotrZSL added a comment. Remove added -- Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146875/new/ https://reviews.llvm.org/D146875 Files: clang-tools-extra/clang-tidy/add_new_check.py Index: cla

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

2023-03-30 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Looks ok, would be good to run this on some code base. Comment at: clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp:22 + cxxMethodDecl(anyOf(cxxConstructorDecl(isMoveConstructor()), + hasOverloade

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

2023-03-30 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. Overall looks good to me. Leave it open for few days, maybe someone else want to comment. Comment at: clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCh

[PATCH] D146875: [clang-tidy] Fix example provided by add_new_check.py

2023-03-30 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG3b919a5e01ef: [clang-tidy] Fix example provided by add_new_check.py (authored by PiotrZSL). Repository: rG LLVM Github

[PATCH] D147194: [clang-tidy] fix concat-nest-namespace fix hint remove the macro

2023-03-30 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. You changed half of this check logic, please take a look into those issues for this check: https://github.com/llvm/llvm-project/issues/60051 https://github.com/llvm/llvm-project/issues/60048 https://github.com/llvm/llvm-project/issues/60035 https://github.com/llvm/llvm-p

[PATCH] D147194: [clang-tidy] fix concat-nest-namespace fix hint remove the macro

2023-03-30 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/concat-nested-namespaces/modernize-concat-nested-namespaces.h:8 // CHECK-FIXES: void t(); -// CHECK-FIXES-NEXT: } // namespace nn1 +// CHECK-FIXES-NEXT: } // namespace nn2 --

[PATCH] D147315: [clang-tidy] support unscoped enumerations in readability-static-accessed-through-instance

2023-03-31 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Add test with scoped enums, to validate that it works correctly. In theory this change should suport them also. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147315/new/ https://reviews.llvm.org/D147315 __

[PATCH] D147315: [clang-tidy] support unscoped enumerations in readability-static-accessed-through-instance

2023-03-31 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. And update commit message to be more descriptive... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147315/new/ https://reviews.llvm.org/D147315 ___ cfe-commits mailing list cfe-c

[PATCH] D144522: [clang-tidy] Add readability-operators-representation check

2023-03-31 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. @carlosgalvezp Thank you, by any chance would you be able to look into other reviews ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144522/new/ https://reviews.llvm.org/D144522 ___

[PATCH] D144522: [clang-tidy] Add readability-operators-representation check

2023-03-31 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa084854266ca: [clang-tidy] Add readability-operators-representation check (authored by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D144522?vs=508310&id=510055#toc Repository: rG LLVM

[PATCH] D31308: [clang-tidy] new check readability-no-alternative-tokens

2023-03-31 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL abandoned this revision. PiotrZSL added a comment. Obsolete by D144522 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D31308/new/ https://reviews.llvm.org/D31308 ___ cfe-commits mailing list cfe-commi

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2023-03-31 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL abandoned this revision. PiotrZSL added a comment. Obsolete by D144522 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107294/new/ https://reviews.llvm.org/D107294 _

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

2023-03-31 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. Detects potentially uni

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

2023-03-31 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. There are 37 findings in llvm repository: 1. clang-tools-extra/clang-tidy/ClangTidyCheck.cpp:96:12: warning: conversion from 'std::optional' into 'bool' and back into 'std::optional', remove potentially error-prone optional dereference [bugprone-optional-value-convers

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

2023-03-31 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 510132. PiotrZSL added a comment. Fix doc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147357/new/ https://reviews.llvm.org/D147357 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp cla

[PATCH] D144347: [clang-tidy] Add readability-forward-usage check

2023-03-31 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked an inline comment as done. PiotrZSL added a comment. I will leave this review open for 1 more week, in case someone have some comments, and by someone I mean you @carlosgalvezp. Comment at: clang-tools-extra/clang-tidy/readability/ForwardUsageCheck.cpp:98 +

[PATCH] D147315: [clang-tidy] support unscoped enumerations in readability-static-accessed-through-instance

2023-03-31 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. Ok, you right. Fix all open issues, and update commit message to be more detailed. Except that, LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D144347: [clang-tidy] Add readability-forward-usage check

2023-04-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL planned changes to this revision. PiotrZSL added a comment. TODO: Extract DisableTypeMismatchSuggestion & that logic into separate check in bugprone category. TODO: Validate more situations with templates. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D146881: [clang-tidy] Fix findNextTokenSkippingComments & rangeContainsExpansionsOrDirectives

2023-04-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/LexerUtils.cpp:84-85 +Lexer::findNextToken(Start, SM, LangOpts); +if (!CurrentToken || !CurrentToken->is(tok::comment)) + return CurrentToken; + carlosgalvezp wrote: >

[PATCH] D146881: [clang-tidy] Fix findNextTokenSkippingComments & rangeContainsExpansionsOrDirectives

2023-04-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. We don't have unit tests for most of code... It's usually tested indirectly by checks... But this code is used I think only in 1-2 checks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146881/new/ https://reviews.llvm.org

[PATCH] D147379: [clang-tidy] Disable misc-definitions-in-headers for declarations in anonymous namespaces

2023-04-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147379/new/ https://reviews.llvm.org/D147379 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D147315: [clang-tidy] support unscoped enumerations in readability-static-accessed-through-instance

2023-04-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Well, description update didn't update, you can update it here in UI, just edit revision, if you use "arc", there is a switch to apply description update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147315/new/ https://

[PATCH] D147376: [clang-tidy] Small refactor for ExceptionAnalyzer

2023-04-02 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/D147376/new/ https://reviews.llvm.org/D147376 __

[PATCH] D147194: [clang-tidy] fix concat-nest-namespace fix hint remove the macro

2023-04-02 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:69 + } + SourceRange{ND->getBeginLoc(), Tok->getEndLoc()}.dump(SM); + return SourceRange{ND->getBeginLoc(), Tok->getEndLoc()}; Remove this debug

[PATCH] D146881: [clang-tidy] Fix findNextTokenSkippingComments & rangeContainsExpansionsOrDirectives

2023-04-02 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd79715b6a09c: [clang-tidy] Fix findNextTokenSkippingComments &… (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146881/new/ https://re

[PATCH] D147417: [clang-tidy] Do not emit bugprone-exception-escape warnings from coroutines

2023-04-03 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-coro.cpp:115 + +// CHECK-MESSAGES add tests with c_yield and co_await Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D147419: [clang-tidy] ignore NRVO const variables in performance-no-automatic-move.

2023-04-03 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. Current change is correct. This check could be improved in future. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147419/new/ https://reviews.llvm.org/D147419

[PATCH] D147419: [clang-tidy] ignore NRVO const variables in performance-no-automatic-move.

2023-04-03 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Add release notes entry !. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147419/new/ https://reviews.llvm.org/D147419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D147417: [clang-tidy] Do not emit bugprone-exception-escape warnings from coroutines

2023-04-03 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-coro.cpp:91 +const auto d_ShouldNotDiag = [](const int a, const int b) -> task { + // CHECK-MESSAGES-NOT: :[[@LINE-1]]:30: warning: an exception may be thrown in fu

[PATCH] D147419: [clang-tidy] ignore NRVO const variables in performance-no-automatic-move.

2023-04-03 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe51f46705e28: [clang-tidy] ignore NRVO const variables in performance-no-automatic-move. (authored by gnanabit, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D147411: [clang-tidy] Fix readability-static-accessed-through-instance check for anonymous structs

2023-04-03 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/D147411/new/ https://reviews.llvm.org/D147411 ___

[PATCH] D147383: [clang-tidy] Allow bugprone-unchecked-optional-access to handle calls to `std::forward`

2023-04-03 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 Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:589-591 + if (LocArg == nullptr) { +return; + } ``` if (

[PATCH] D147411: [clang-tidy] Fix readability-static-accessed-through-instance check for anonymous structs

2023-04-04 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3afe3dbfa015: [clang-tidy] Fix readability-static-accessed-through-instance check for… (authored by AMS21, committed by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D147411?vs=510537&id

[PATCH] D147383: [clang-tidy] Allow bugprone-unchecked-optional-access to handle calls to `std::forward`

2023-04-04 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 rG25956d55d024: [clang-tidy] Allow bugprone-unchecked-optional-access to handle calls to `std… (authored by AMS21, committed by PiotrZSL). Changed pr

[PATCH] D147376: [clang-tidy] Small refactor for ExceptionAnalyzer

2023-04-04 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe588ef8a7a53: [clang-tidy] Small refactor for ExceptionAnalyzer (authored by AMS21, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147

[PATCH] D147551: [clang-tidy] Fix init-list handling in readability-implicit-bool-conversion

2023-04-04 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. Adds support for explic

[PATCH] D147417: [clang-tidy] Do not emit bugprone-exception-escape warnings from coroutines

2023-04-04 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. " clang-tidy already warns with bugprone-exception-escape on the destructor of Evil even when it is marked noexcept(false)" https://reviews.llvm.org/D145865 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147417/new/ https:

[PATCH] D147551: [clang-tidy] Fix init-list handling in readability-implicit-bool-conversion

2023-04-05 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdfa8f5b13e58: [clang-tidy] Fix init-list handling in readability-implicit-bool-conversion (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

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

2023-04-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Thank you for review, I will correct comments in this week. Comment at: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp:107 +CheckFactories.registerCheck( +"bugprone-enum-to-bool-conversion"); CheckFactories.registerCheck(

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

2023-04-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL planned changes to this revision. PiotrZSL added a comment. TODO: Fix review comments, rename check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144036/new/ https://reviews.llvm.org/D144036 __

[PATCH] D137782: [clang-tidy]bugprone-fold-init-type

2023-04-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Missing ReleaseNotes, Comment at: clang-tools-extra/clang-tidy/bugprone/FoldInitTypeCheck.cpp:41 +returns(hasCanonicalType( +referenceType(pointee(BuiltinTypeWithId(ID), +// `value_typ

[PATCH] D137782: [clang-tidy]bugprone-fold-init-type

2023-04-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:101 +- :doc:`bugprone-fold-init-type + ` now handles iterators that do not Wrong section, this should be in 'Changes in existing checks' Repository: rG LLVM Github Monorep

[PATCH] D137782: [clang-tidy]bugprone-fold-init-type

2023-04-07 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/D137782/new/ https://reviews.llvm.org/D137782 ___

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

2023-04-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:367-379 +if (const auto *TD = dyn_cast(ND)) { + QualType QT = TD->getType(); + + size_t PtrCount = 0; + if (QT->isPointerType()) { +

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

2023-04-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Missing release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147779/new/ https://reviews.llvm.org/D147779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[PATCH] D147194: [clang-tidy] fix concat-nest-namespace fix hint remove the macro

2023-04-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Overall looks +- fine, these are last comments from me. Comment at: clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:127 + + for (size_t Index = 0; Index < Namespaces.size(); Index++) { +if (Namespaces[Index]->isNested()) --

[PATCH] D146904: [clang-tidy] Fix extern fixes in readability-redundant-declaration

2023-04-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability/redundant-declaration.cpp:126 +extern "C" int externX; +int dumyBegin;extern "C" int externX;int dummyEnd; +// CHECK-MESSAGES: :[[@LINE-1]]:30: warning: redundant 'externX' declara

[PATCH] D146904: [clang-tidy] Fix extern fixes in readability-redundant-declaration

2023-04-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.cpp:86 + Result.Nodes.getNodeAs("extern"); + Extern && !Extern->hasBraces()) +BeginLoc = Extern->getExternLoc(); carlosga

[PATCH] D146904: [clang-tidy] Fix extern fixes in readability-redundant-declaration

2023-04-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 511901. PiotrZSL added a comment. Added release notes, fixed typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146904/new/ https://reviews.llvm.org/D146904 Files: clang-tools-extra/clang-tidy/readability/

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

2023-04-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked 14 inline comments as done. PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/enum-to-bool-conversion.rst:12-13 + +The check produces false positives if the ``enum`` is used to store other values +(used as a bit-mask o

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

2023-04-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 511904. PiotrZSL marked an inline comment as done. PiotrZSL retitled this revision from "[clang-tidy] Add bugprone-enum-to-bool-conversion check" to "[clang-tidy] Add bugprone-non-zero-enum-to-bool-conversion check". PiotrZSL added a comment. Review fixes +

[PATCH] D146904: [clang-tidy] Fix extern fixes in readability-redundant-declaration

2023-04-08 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd8c948cfe4ef: [clang-tidy] Fix extern fixes in readability-redundant-declaration (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146904

[PATCH] D147857: [clang-tidy] fix false positve for namespace with attrs in modernize-concat-nested-namespaces

2023-04-09 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:304-310 - Fixed an issue in :doc:`modernize-concat-nested-namespaces ` when using macro between namespace

[PATCH] D147857: [clang-tidy] fix false positve for namespace with attrs in modernize-concat-nested-namespaces

2023-04-09 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Reference issue in commit message, so it could auto-close, or close it manualy later. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147857/new/ https://reviews.llvm.org/D147857 ___

[PATCH] D147874: [clang-tidy] Fix AST Library documentation link

2023-04-09 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9f5951f11a0e: [clang-tidy] Fix AST Library documentation link (authored by sousajo, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147

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

2023-04-09 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:706 +size_t IdentifierNamingCheck::HungarianNotation::getAsteriskCount( +std::string &TypeName, const NamedDecl *ND) const { + size_t PtrCount = 0; ---

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

2023-04-09 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, except pointed out issues with order of fixes in release note and missing const. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147779/

[PATCH] D140760: [clang-tidy] Support begin/end free functions in modernize-loop-convert

2023-04-09 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:74 +"rend","crend", "size"}; +static const std::set StdNames{ +"std::begin", "std::cbegin", "std::rbegin", "std::crbegi

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

2023-04-09 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. Ignore duplicated switc

[PATCH] D147893: [clang-tidy] avoid colon in namespace cause false positve

2023-04-09 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:175 + llvm::errs() << Namespaces.size() << " " << ND.getName() << " clear\n"; Namespaces.clear(); debug log... Repository: rG LLVM Github

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

2023-04-09 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 APFloat to compar

[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 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. Support all floating po

[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 512082. PiotrZSL edited the summary of this revision. PiotrZSL added a comment. Update dependency Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147908/new/ https://reviews.llvm.org/D147908 Files: clang-tool

[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 512085. PiotrZSL added a comment. iDependency fix. 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/IncorrectRoundingsC

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

2023-04-10 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. Added option to ignore

[PATCH] D147893: [clang-tidy] avoid colon in namespace cause false positve

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. Except above llvm:errs, looks good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147893/new/ https://reviews.llvm.org/D147893 __

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

2023-04-10 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. Fixed false positive

[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 created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp. Herald added subscribers: shchenz, kbarton, xazax.hun, nemanjai. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-comm

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

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked an inline comment as done. PiotrZSL added a comment. D147908 fixes comments from this on, it's just split into 2 reviews, this as fixing issue, and other as introducing improvment. Comment at: clang-tools-extra/clang-tidy/bug

<    1   2   3   4   5   6   7   8   9   >