[PATCH] D116478: [clang-tidy] A semicolon-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-25 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:161 + check now supports an ``IgnoredFunctions`` option to explicitly consider + the specified semicolon-separated functions list as not any

[PATCH] D116478: [clang-tidy] A semicolon-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-25 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG19d7a0b47b68: [clang-tidy] [bugprone-assert-side-effect] Ignore list for functions/methods (authored by zinovy.nis). Changed prior to commit: https://reviews.llvm.org/D116478?vs=402199=402956#toc

[PATCH] D116478: [clang-tidy] A semicolon-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 402199. zinovy.nis added a comment. - Remove unused include. - Update release notes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 Files:

[PATCH] D116478: [clang-tidy] A semicolon-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-20 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Any other comments? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D116478: [clang-tidy] A semicolon-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-15 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 400303. zinovy.nis marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 Files: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-15 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked 4 inline comments as done. zinovy.nis added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp:57-60 if (const auto *FuncDecl = CExpr->getDirectCallee()) { if (FuncDecl->getDeclName().isIdentifier() && -

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-15 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 400301. zinovy.nis added a comment. - Support regexp for list of ignored functions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 Files:

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-09 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 398410. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 Files: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.h

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-09 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 398409. zinovy.nis marked 5 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 Files: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-09 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 398408. zinovy.nis added a comment. - ``FunctionException`` -> ``IgnoredFunctions`` - Fixed double ticks in rst docs. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 Files:

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-02 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 396927. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 Files: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.h

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-02 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D116478#3216082 , @Eugene.Zelenko wrote: > Please mention new option in Release Notes (in changes in existing checks > section). Done CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-02 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 396914. zinovy.nis added a comment. Updated release notes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 Files: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 396869. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 Files: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.h

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 396867. zinovy.nis added a comment. Fix clang-format issues. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 Files: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: alexfh, aaron.ballman. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: carlosgalvezp, xazax.hun. zinovy.nis requested review of this revision. Herald added a subscriber: cfe-commits. A comma-separated list of

[PATCH] D91495: [clang-tidy] false-positive for bugprone-redundant-branch-condition in case of passed-by-ref params

2020-12-11 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG709112bce442: [clang-tidy] false-positive for bugprone-redundant-branch-condition in case of… (authored by zinovy.nis). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D91495: [clang-tidy] false-positive for bugprone-redundant-branch-condition in case of passed-by-ref params

2020-12-05 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 309732. zinovy.nis added a comment. Fixed remarks from Aaron. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91495/new/ https://reviews.llvm.org/D91495 Files: clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp

[PATCH] D91495: [clang-tidy] false-positive for bugprone-redundant-branch-condition in case of passed-by-ref params

2020-11-29 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. What do you think of it? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91495/new/ https://reviews.llvm.org/D91495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D91495: [clang-tidy] false-positive for bugprone-redundant-branch-condition in case of passed-by-ref params

2020-11-25 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 307646. zinovy.nis added a comment. Handle ref & val mixed cases. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91495/new/ https://reviews.llvm.org/D91495 Files: clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp

[PATCH] D91495: [clang-tidy] false-positive for bugprone-redundant-branch-condition in case of passed-by-ref params

2020-11-18 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-redundant-branch-condition.cpp:968 + } +} + aaron.ballman wrote: > Another test that would be interesting is: > ``` > if (tryToExtinguish(isSet) && isSet) { >

[PATCH] D91495: [clang-tidy] false-positive for bugprone-redundant-branch-condition in case of passed-by-ref params

2020-11-15 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 305361. zinovy.nis added a comment. Extend the context. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91495/new/ https://reviews.llvm.org/D91495 Files: clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-15 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-redundant-branch-condition.cpp:1092 + // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: redundant condition 'isSet' [bugprone-redundant-branch-condition] + // CHECK-FIXES:

[PATCH] D91495: [clang-tidy] false-positive for bugprone-redundant-branch-condition in case of passed-by-ref params

2020-11-15 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: aaron.ballman, baloghadamsoftware. Herald added subscribers: cfe-commits, rnkovacs, xazax.hun. Herald added a project: clang. zinovy.nis requested review of this revision. Inspired by discussion in https://reviews.llvm.org/D91037

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-13 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D91037#2391915 , @aaron.ballman wrote: > LGTM! Thanks! I'll see what can be done to deal with it in a separate commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-13 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4364539b3a4c: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on… (authored by zinovy.nis). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-12 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-redundant-branch-condition.cpp:1092 + // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: redundant condition 'isSet'

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-12 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-redundant-branch-condition.cpp:1092 + // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: redundant condition 'isSet' [bugprone-redundant-branch-condition] + // CHECK-FIXES:

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-redundant-branch-condition.cpp:1092 + // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: redundant condition 'isSet'

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 304719. zinovy.nis added a comment. Fixed fix-it section. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91037/new/ https://reviews.llvm.org/D91037 Files: clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp:45 ifStmt( hasCondition(ignoringParenImpCasts(anyOf(

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 304561. zinovy.nis added a comment. Use `IgnoreParenImpCasts` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91037/new/ https://reviews.llvm.org/D91037 Files: clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-10 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added a comment. In D91037#2387377 , @njames93 wrote: > Taking a step back, rather than worrying about if its an `ExprWithCleanups`. > Shouldn't we just get the condition removing all implicit

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-10 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked 2 inline comments as done. zinovy.nis added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp:145 + const auto *LeftDRE = dyn_cast(CondOp->getLHS()->IgnoreParenImpCasts());

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-10 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 304400. zinovy.nis added a comment. Simplified to use `IgnoreImplicit()`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91037/new/ https://reviews.llvm.org/D91037 Files: clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-10 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp:85 // remove the inner `if`. - const auto *BinOpCond = dyn_cast(InnerIf->getCond()); + const auto *BinOpCond =

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-10 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 304280. zinovy.nis added a comment. dyn_cast_or_null -> dyn_cast CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91037/new/ https://reviews.llvm.org/D91037 Files: clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-10 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked 2 inline comments as done. zinovy.nis added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp:85 // remove the inner `if`. - const auto *BinOpCond = dyn_cast(InnerIf->getCond()); + const auto *BinOpCond =

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-10 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done and 2 inline comments as not done. zinovy.nis added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp:85 // remove the inner `if`. - const auto *BinOpCond =

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-10 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 304242. zinovy.nis marked 2 inline comments as done. zinovy.nis added a comment. *iterator -> getSubExpr() CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91037/new/ https://reviews.llvm.org/D91037 Files:

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-08 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 303750. zinovy.nis edited the summary of this revision. zinovy.nis added a comment. auto -> const auto. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91037/new/ https://reviews.llvm.org/D91037 Files:

[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups

2020-11-08 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D91037#2381606 , @njames93 wrote: > Think this has an incorrect name, seems to have something to do with > `bugprone-redundant-branch-condition` Oops, thanks to autofill. Fixed. Repository: rG LLVM Github Monorepo

[PATCH] D91037: [clang-tidy][bugprone-use-after-mnove] Warn on std::move for consts

2020-11-08 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. zinovy.nis requested review of this revision. Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups. Bug: https://bugs.llvm.org/show_bug.cgi?id=48008. Repository:

[PATCH] D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs

2020-10-11 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG32d565b4618d: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs (authored by zinovy.nis). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs

2020-10-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D89194#2323917 , @JonasToth wrote: > I am fine now, thank you! Thanks! Is this patch ready for landing? Or should I wait for a few more approvals? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89194/new/

[PATCH] D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs

2020-10-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 297468. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89194/new/ https://reviews.llvm.org/D89194 Files: clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp

[PATCH] D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs

2020-10-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D89194#2323868 , @JonasToth wrote: > LGTM. > Short reminder to please use full context patches. Its not an issue right > now, but review sometimes just needs the context to understand the changes :) Sorry. Done.

[PATCH] D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs

2020-10-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 297463. zinovy.nis added a comment. Full diff. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89194/new/ https://reviews.llvm.org/D89194 Files: clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp

[PATCH] D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs

2020-10-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Done. Any other comments/ideas? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89194/new/ https://reviews.llvm.org/D89194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs

2020-10-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 297462. zinovy.nis added a comment. - Updated docs on the matcher. - Register the new matcher. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89194/new/ https://reviews.llvm.org/D89194 Files:

[PATCH] D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs

2020-10-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 297458. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89194/new/ https://reviews.llvm.org/D89194 Files: clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp

[PATCH] D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs

2020-10-10 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. Herald added subscribers: cfe-commits, lebedev.ri, xazax.hun. Herald added a reviewer: lebedev.ri. Herald added a project: clang. zinovy.nis requested review of this revision. Assert fires on weak refs like static void dont_crash_on_weak()

[PATCH] D87627: [clang-tidy] Fix crash in modernize-use-noexcept on uninstantiated throw class

2020-09-15 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG96c6d012dfe2: [clang-tidy] Fix crash in modernize-use-noexcept on uninstantiated throw class (authored by zinovy.nis). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D87627: [clang-tidy] Fix crash in modernize-use-noexcept on uninstantiated throw class

2020-09-15 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87627/new/ https://reviews.llvm.org/D87627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D87627: [clang-tidy] Fix crash in modernize-use-noexcept on uninstantiated throw class

2020-09-15 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 291971. zinovy.nis marked 2 inline comments as done. zinovy.nis added a comment. - Fixed the test. - Fixed clang-format issues. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87627/new/ https://reviews.llvm.org/D87627 Files:

[PATCH] D87627: [clang-tidy] Fix crash in modernize-use-noexcept on uninstantiated throw class

2020-09-14 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: alexfh, rsmith. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. zinovy.nis requested review of this revision. Bug:

[PATCH] D80896: [clang-tidy][misc-redundant-expression] Support for CXXFoldExpr

2020-06-05 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D80896#2076735 , @njames93 wrote: > How are you landing these changes, because the commit message isn't lining up > with the PR name? It was my fault: I hadn't changed a title in my local branch and pushed it with git.

[PATCH] D80896: [clang-tidy][misc-redundant-expression] Support for CXXFoldExpr

2020-06-05 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc063b4a72bb3: Fix crash on misc-redundant-expression (authored by zinovy.nis). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80896/new/

[PATCH] D80896: [clang-tidy][misc-redundant-expression] Support for CXXFoldExpr

2020-06-04 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/misc-redundant-expression.cpp:196 bool operator>(const MyStruct& lhs, MyStruct& rhs) { rhs.x--; return lhs.x > rhs.x; } bool

[PATCH] D80896: [clang-tidy][misc-redundant-expression] Support for CXXFoldExpr

2020-06-04 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 268527. zinovy.nis added a comment. Simplify test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80896/new/ https://reviews.llvm.org/D80896 Files: clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp

[PATCH] D80536: [clang-tidy][modernize-loop-convert] Make loop var type human readable

2020-06-04 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6271b96bef47: [clang-tidy][modernize-loop-convert] Make loop var type human readable (authored by zinovy.nis). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D80896: [clang-tidy][misc-redundant-expression] Support for CXXFoldExpr

2020-06-04 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. @njames93, @aaron.ballman do you have any other comments? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80896/new/ https://reviews.llvm.org/D80896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D80896: [clang-tidy][misc-redundant-expression] Support for CXXFoldExpr

2020-06-02 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. @njames93, do you still have any comments? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80896/new/ https://reviews.llvm.org/D80896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D80896: [clang-tidy][misc-redundant-expression] Support for CXXFoldExpr

2020-06-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked 2 inline comments as done. zinovy.nis added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/misc-redundant-expression.cpp:18 +namespace no_crash { +struct Foo {}; I had to move this up as no warnings were generated in

[PATCH] D80896: [clang-tidy][misc-redundant-expression] Support for CXXFoldExpr

2020-06-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 267565. zinovy.nis added a comment. - Fix test. - Simplify the code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80896/new/ https://reviews.llvm.org/D80896 Files: clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp

[PATCH] D80896: [clang-tidy][misc-redundant-expression] Fix crash on CXXFoldExpr

2020-06-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 267546. zinovy.nis added a comment. Fix and simplify the condition. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80896/new/ https://reviews.llvm.org/D80896 Files: clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp

[PATCH] D80896: [clang-tidy][misc-redundant-expression] Fix crash on CXXFoldExpr

2020-05-31 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 267518. zinovy.nis added a comment. Fix formatting. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80896/new/ https://reviews.llvm.org/D80896 Files: clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp

[PATCH] D80896: [clang-tidy][misc-redundant-expression] Fix crash on CXXFoldExpr

2020-05-31 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added a reviewer: etienneb. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Fix for a crash from https://bugs.llvm.org/show_bug.cgi?id=44256 Bug: https://bugs.llvm.org/show_bug.cgi?id=44256 Repository: rG LLVM

[PATCH] D80536: [clang-tidy][modernize-loop-convert] Make loop var type human readable

2020-05-29 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Nathan, do you have any other questions/comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80536/new/ https://reviews.llvm.org/D80536 ___ cfe-commits mailing list

[PATCH] D80536: [clang-tidy][modernize-loop-convert] Make loop var type human readable

2020-05-27 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D80536#2055500 , @njames93 wrote: > I'm having trouble with the reproduction of this - > https://godbolt.org/z/tsMfcj. > Aside from that this needs some test cases to demonstrate the patch is > indeed working Thanks.

[PATCH] D80536: [clang-tidy][modernize-loop-convert] Make loop var type human readable

2020-05-26 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: angelgarcia, alexfh. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. zinovy.nis edited the summary of this revision. Without this patch

[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

2020-04-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. One more gentle ping) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74692/new/ https://reviews.llvm.org/D74692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

2020-04-05 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 255128. zinovy.nis added a comment. Rebase over the current master. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74692/new/ https://reviews.llvm.org/D74692 Files: clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp

[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

2020-03-24 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Gentle ping) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74692/new/ https://reviews.llvm.org/D74692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

2020-03-15 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D74692#1923191 , @Quuxplusone wrote: > I still think this entire patch is misguided; there's no reason to make the > note for `const std::string s; std::move(s)` any longer than the note for > `int i; std::move(i)` or

[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

2020-03-14 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 250375. zinovy.nis added a comment. Removed top-level consts. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74692/new/ https://reviews.llvm.org/D74692 Files: clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp

[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

2020-03-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. I'm done, Aaron, Quuxplusone, do you have any comments? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74692/new/ https://reviews.llvm.org/D74692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

2020-03-08 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked 2 inline comments as done. zinovy.nis added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-use-after-move.cpp:342 + // CHECK-NOTES: [[@LINE-5]]:20: note: variable 'a' implicitly captured const here }; }

[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

2020-03-08 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D74692#1911150 , @Quuxplusone wrote: > Anyway, I still don't see the point of this patch. It seems like you're just > duplicating the work of `performance-move-const-arg`. People who want to be > shown notes about

[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

2020-03-07 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-use-after-move.cpp:342 + // CHECK-NOTES: [[@LINE-5]]:20: note: variable 'a' implicitly captured const here }; } aaron.ballman wrote: > One more test

[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

2020-03-07 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 248905. zinovy.nis marked 4 inline comments as done. zinovy.nis added a comment. Cosmetic and style fixes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74692/new/ https://reviews.llvm.org/D74692 Files:

[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

2020-03-06 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Any further comments? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74692/new/ https://reviews.llvm.org/D74692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

2020-03-03 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 247985. zinovy.nis added a comment. Typo fixed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74692/new/ https://reviews.llvm.org/D74692 Files: clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp

[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

2020-03-03 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 247982. zinovy.nis added a comment. 1. Special handling for captured variables in lambdas, 2. messages texts were changed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74692/new/ https://reviews.llvm.org/D74692 Files:

[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

2020-02-26 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-use-after-move.cpp:329 // CHECK-NOTES: [[@LINE-3]]:7: note: move occurred here + // CHECK-NOTES: [[@LINE-6]]:7: note:

[PATCH] D74692: [clang-tidy] Make bugprone-use-after-move ignore std::move for const values

2020-02-25 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 246628. zinovy.nis added a comment. Warning on use after move is still generated. But there's also an additional note > std::move of the const expression has no effect; remove std::move() or make > the variable non-const CHANGES SINCE LAST ACTION

[PATCH] D75021: [clang][analyzer] Enable core.builtin even with -no-default-checks

2020-02-23 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: abdulras, xazax.hun. zinovy.nis added a project: clang. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. It's required to properly handle

[PATCH] D74692: [clang-tidy] Make bugprone-use-after-move ignore std::move for const values

2020-02-20 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D74692#1884054 , @Quuxplusone wrote: > (I sent this to the mailing list, but I guess it doesn't show up here unless > I do it through Phab. Quoting myself—) > > I see your point about how users who care should always be

[PATCH] D74692: [clang-tidy] Make bugprone-use-after-move ignore std::move for const values

2020-02-17 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D74692#1879039 , @mboehme wrote: > Even if no move actually happens, the code is still wrong IMHO, it's not wrong, but it's inefficient. And will be reported by performance-move-const-arg. Repository: rG LLVM Github

[PATCH] D74692: [clang-tidy] Make bugprone-use-after-move ignore std::move for const values

2020-02-16 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 244878. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74692/new/ https://reviews.llvm.org/D74692 Files: clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp clang-tools-extra/test/clang-tidy/checkers/bugprone-use-after-move.cpp

[PATCH] D74692: [clang-tidy] Make bugprone-use-after-move ignore std::move for const values

2020-02-16 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 244876. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74692/new/ https://reviews.llvm.org/D74692 Files: clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp clang-tools-extra/test/clang-tidy/checkers/bugprone-use-after-move.cpp

[PATCH] D74692: [clang-tidy] Make bugprone-use-after-move ignore std::move for const values

2020-02-16 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: mboehme, alexfh. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, mgehre, xazax.hun. Herald added a project: clang. std::move for const values is NO-OP, so it has no sense to report it in

[PATCH] D57662: [clang-tidy] Parallelize clang-tidy-diff.py

2019-12-29 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D57662#1797607 , @derek wrote: > @zinovy.nis @alexfh @JonasToth @MyDeveloperDay > > I'd be happy to provide a patch. It would be nice, thanks! Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

[PATCH] D69746: [analyzer] FixItHint: Apply and test hints with the Clang Tidy's script

2019-11-03 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:152 + + if (llvm::Error Err = Repls.add(Repl)) +llvm_unreachable("An error occured during fix-it replacements"); Isn't `llvm_unreacheable`

[PATCH] D65104: [clang-tidy] Add FixItHint for performance-noexcept-move-constructor

2019-08-04 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367785: [clang-tidy] Add FixItHint for performance-noexcept-move-constructor (authored by zinovy.nis, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D65104: [clang-tidy] Add FixItHint for performance-noexcept-move-constructor

2019-07-24 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 211429. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65104/new/ https://reviews.llvm.org/D65104 Files: clang-tidy/performance/NoexceptMoveConstructorCheck.cpp test/clang-tidy/performance-noexcept-move-constructor-fix.cpp Index:

[PATCH] D65104: [clang-tidy] Add FixItHint for performance-noexcept-move-constructor

2019-07-24 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 211428. zinovy.nis added a comment. - Fixed tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65104/new/ https://reviews.llvm.org/D65104 Files: clang-tidy/performance/NoexceptMoveConstructorCheck.cpp

[PATCH] D65104: [clang-tidy] Add FixItHint for performance-noexcept-move-constructor

2019-07-24 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: clang-tidy/performance/NoexceptMoveConstructorCheck.cpp:57 + assert(Decl->getNumParams() > 0); + SourceLocation NoexceptLoc = Decl->getParamDecl(Decl->getNumParams() - 1) +

[PATCH] D65104: [clang-tidy] Add FixItHint for performance-noexcept-move-constructor

2019-07-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 211147. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65104/new/ https://reviews.llvm.org/D65104 Files: clang-tidy/performance/NoexceptMoveConstructorCheck.cpp test/clang-tidy/performance-noexcept-move-constructor-fix.cpp Index:

[PATCH] D65104: [clang-tidy] Add FixItHint for performance-noexcept-move-constructor

2019-07-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: alexfh, rsmith, aaron.ballman. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D65104 Files:

  1   2   3   >