[PATCH] D129070: [clang-tidy] Fixed an issue in readability-identifier-naming not using options specified.

2022-07-04 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, LegalizeAdulthood. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-

[PATCH] D129070: [clang-tidy] Fixed an issue in readability-identifier-naming not using options specified.

2022-07-04 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 442101. njames93 added a comment. Small tweak. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129070/new/ https://reviews.llvm.org/D129070 Files: clang-tools-extra/clang-tidy/readability/IdentifierNamingChec

[PATCH] D129202: [clang] Add a fixit for warn-self-assign if LHS is a field with the same name as parameter on RHS

2022-07-06 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, rsmith. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add a fix-it for the common case of setters/constructors using parameters

[PATCH] D129202: [clang] Add a fixit for warn-self-assign if LHS is a field with the same name as parameter on RHS

2022-07-06 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 442559. njames93 added a comment. Remove unnecessary extra include. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129202/new/ https://reviews.llvm.org/D129202 Files: clang/include/clang/Basic/DiagnosticSema

[PATCH] D129202: [clang] Add a fixit for warn-self-assign if LHS is a field with the same name as parameter on RHS

2022-07-06 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 3 inline comments as done. njames93 added a comment. In D129202#3633618 , @aaron.ballman wrote: > Thank you for working on this, I think it's a nice new diagnostic. You should > add a release note to describe it. One question I have is a

[PATCH] D129202: [clang] Add a fixit for warn-self-assign if LHS is a field with the same name as parameter on RHS

2022-07-06 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 442788. njames93 marked an inline comment as done. njames93 added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129202/new/ https://reviews.llvm.org/D129202 Files: clang/docs/Re

[PATCH] D128314: [Clang-tidy] Fixing a bug in clang-tidy infinite-loop checker

2022-07-07 Thread Nathan James via Phabricator via cfe-commits
njames93 added a subscriber: klimek. njames93 added a comment. Sorry to do this again, but could this be split up again, one patch for the new matcher and the tests associated with it, then another for the actual bug fix. Also cc @klimek as he is the code owner of ASTMatchers Repository: rG L

[PATCH] D129202: [clang] Add a fixit for warn-self-assign if LHS is a field with the same name as parameter on RHS

2022-07-08 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 443180. njames93 added a comment. Attach fix directly to the warning. Extend checking to also work with move assignments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129202/new/ https://reviews.llvm.org/D129

[PATCH] D129202: [clang] Add a fixit for warn-self-assign if LHS is a field with the same name as parameter on RHS

2022-07-08 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 443417. njames93 added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129202/new/ https://reviews.llvm.org/D129202 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/D

[PATCH] D129398: [ASTMatchers] Add a new matcher for callee declarations of Obj-C message expressions

2022-07-09 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 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/D129398/new/ https://reviews.llvm.org/D129398 ___

[PATCH] D129202: [clang] Add a fixit for warn-self-assign if LHS is a field with the same name as parameter on RHS

2022-07-09 Thread Nathan James 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 rG54f57d3847c0: [clang] Add a fixit for warn-self-assign if LHS is a field with the same nameā€¦ (authored by njames93). Repository: rG LLVM Github Mo

[PATCH] D129420: [clang-tidy] Initialize boolean variables with 'false' in cppcoreguidelines-init-variables' fix-it

2022-07-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Can you add a line to release notes about this fix then LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129420/new/ https://reviews.llvm.org/D129420 ___ cfe-commits mailing l

[PATCH] D129420: [clang-tidy] Initialize boolean variables with 'false' in cppcoreguidelines-init-variables' fix-it

2022-07-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:188 by checking for an arbitrary expression in the second argument of ``memset``. - Improved :doc:`cppcoreguidelines-prefer-member-initializer It should live here instead.

[PATCH] D120185: [ASTMatchers] Output currently processing match and nodes on crash

2022-03-23 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D120185#3397508 , @thakis wrote: > Looks like this breaks tests on Windows: > http://45.33.8.238/win/54785/step_7.txt > > Please take a look, and revert for now if takes a while to fix. I can't seem to reproduce the test fai

[PATCH] D120185: [ASTMatchers] Output currently processing match and nodes on crash

2022-03-23 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D120185#3403270 , @aaron.ballman wrote: > I'd like to understand what's happening better rather than land with a > disabled test. Not getting the crash dump in some circumstances could either > be specific to the machine co

[PATCH] D120185: [ASTMatchers] Output currently processing match and nodes on crash

2022-03-24 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D120185#3405091 , @aaron.ballman wrote: > @thakis -- is it possible your build bot is configured to disable generation > of crash dumps? So with a lot of trial and error, it seems that on certain windows configurations, cr

[PATCH] D122078: [clang-tidy] Ignore concepts in `misc-redundant-expression`

2022-03-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D122078#3407984 , @aaron.ballman wrote: > Okie dokie, thanks for weighing in! This LGTM (feel free to add the release > note when landing). If @alexfh has some technical concerns with > `hasAncestor()`, we can always revert

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2022-03-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I share @aaron.ballman option that given the flakiness of the guidelines, the check shouldn't mention that it addresses the c++core guidelines. Instead moving the check into another module(misc) would still provide immense value, with the side effect that it is still a

[PATCH] D120185: [ASTMatchers] Output currently processing match and nodes on crash

2022-03-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I've landed it and your build bot is happy, there was another failing buildbot so I'll keep an eye on it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120185/new/ https://reviews.llvm.org/D120185 ___

[PATCH] D122529: [ASTMatchers] Output currently matching node on crash

2022-03-26 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: klimek, aaron.ballman, LegalizeAdulthood. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Extend D120185 to a

[PATCH] D122529: [ASTMatchers] Output currently matching node on crash

2022-03-27 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 418473. njames93 added a comment. Update tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122529/new/ https://reviews.llvm.org/D122529 Files: clang/lib/ASTMatchers/ASTMatchFinder.cpp clang/unittests/A

[PATCH] D122529: [ASTMatchers] Output currently matching node on crash

2022-03-30 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6e33e45b9430: [ASTMatchers] Output currently matching node on crash (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D122529?vs=418473&id=419178#toc Repository: rG LLVM Githu

[PATCH] D94942: [clangd] Add tweak for implementing abstract class

2022-03-31 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D94942#3419616 , @sammccall wrote: > @njames93 I had completely forgotten about this when I attempted the same > thing early this year. > I never finished it but wanted to share what I had in case it's useful: > http://review

[PATCH] D122529: [ASTMatchers] Output currently matching node on crash

2022-04-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 419662. njames93 added a comment. Split PointerUnion to work on 32bit platforms Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122529/new/ https://reviews.llvm.org/D122529 Files: clang/lib/ASTMatchers/ASTMat

[PATCH] D122529: [ASTMatchers] Output currently matching node on crash

2022-04-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 419690. njames93 added a comment. Use macro to reduce duplication Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122529/new/ https://reviews.llvm.org/D122529 Files: clang/lib/ASTMatchers/ASTMatchFinder.cpp

[PATCH] D122529: [ASTMatchers] Output currently matching node on crash

2022-04-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D122529#3422158 , @aaron.ballman wrote: > This looks good? to me. :-) > > Despite this complicating things by a fair amount, I don't have a better > suggestion to offer. LGTM This was the "nicest" cheapest way I cou

[PATCH] D122529: [ASTMatchers] Output currently matching node on crash

2022-04-05 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb4ad3c3891e5: Reland "[ASTMatchers] Output currently matching node on crash" (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122529/new

[PATCH] D122535: [clang-tidy] Never consider assignments as equivalent in `misc-redundant-expression` check

2022-04-06 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. FWIW, False negatives are more tolerable than false positives in clang tidy. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122535/new/ https://reviews.llvm.org/D122535 ___ cfe-c

[PATCH] D130181: [clang-tidy] Add readability-use-early-exits check

2022-07-27 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 447967. njames93 added a comment. Fix typo in check list documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130181/new/ https://reviews.llvm.org/D130181 Files: clang-tools-extra/clang-tidy/readabi

[PATCH] D130630: [clang-tidy] Add readability-nested-ifs check

2022-07-27 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, aaron.ballman. Herald added subscribers: carlosgalvezp, xazax.hun, mgorny. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. A

[PATCH] D130639: [clang-tidy] Fix readability-redundant-string-c-str fix for overloaded operator->

2022-07-27 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, LegalizeAdulthood. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-

[PATCH] D130641: [clang-tidy] Extend redundant-string-c-str to also flag constructing a string_view.

2022-07-27 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, LegalizeAdulthood. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-

[PATCH] D130630: [clang-tidy] Add readability-nested-ifs check

2022-07-27 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 448064. njames93 marked an inline comment as done. njames93 added a comment. Remove Excessive Newline. Hopefully fix the windows test failing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130630/new/ https://

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

2022-07-27 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, LegalizeAdulthood. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-

[PATCH] D130630: [clang-tidy] Add readability-nested-ifs check

2022-07-27 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 448172. njames93 added a comment. Fix typo in test file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130630/new/ https://reviews.llvm.org/D130630 Files: clang-tools-extra/clang-tidy/readability/CMakeLists

[PATCH] D127293: [clang-tidy] Ignore other members in a union if any member of it is initialized in cppcoreguidelines-pro-type-member-init

2022-07-28 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. LGTM, You'd need to rebase before landing as the release notes have been reset for the 15 release branching. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127293/new/ https://reviews.llvm.org/D127293 __

[PATCH] D126880: [clang-tidy] Add cppcoreguidelines-avoid-const-or-ref-data-members check

2022-07-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-const-or-ref-data-members.cpp:103-104 +struct WithAlias { + ConstType c; + // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: member 'c' is const qualified + RefType lr; -

[PATCH] D130801: [clang-tidy] Add trace code for ASTVisitors

2022-07-29 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, aaron.ballman. Herald added subscribers: carlosgalvezp, xazax.hun, mgorny. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. T

[PATCH] D128379: [clangd] Change the url for clang-tidy check documentation

2022-07-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. What's the plan with this, a fix wouod likely need to be backportsd for this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128379/new/ https://reviews.llvm.org/D128379 ___ cfe-

[PATCH] D128379: [clangd] Change the url for clang-tidy check documentation

2022-08-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 449046. njames93 added a comment. Revert to first version, just so we can sort out the 15.X branch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128379/new/ https://reviews.llvm.org/D128379 Files: clang-to

[PATCH] D130181: [clang-tidy] Add readability-use-early-exits check

2022-08-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 449048. njames93 added a comment. Rebase and Ping?? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130181/new/ https://reviews.llvm.org/D130181 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt

[PATCH] D130630: [clang-tidy] Add readability-nested-ifs check

2022-08-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 449621. njames93 added a comment. Handle cases where the fix is incorrect due to operator precedence. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130630/new/ https://reviews.llvm.org/D130630 Files: clang-

[PATCH] D131066: [clangd] Add option to disable inlay hints for init lists when building array.

2022-08-03 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, nridge. Herald added subscribers: usaxena95, kadircet, arphaman. Herald added a project: All. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang

[PATCH] D131066: [clangd] Add option to disable inlay hints for init lists when building array.

2022-08-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm not 100% sold on this way of setting this up. There is definitely a use case for splitting the current Designators option into 2, one of them just controlling arrays. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13106

[PATCH] D129353: [clang-tidy] Improve check cert-dcl58-cpp.

2022-08-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This appears to be causing a crash with friend declarations. The crash happens during matching, see https://github.com/llvm/llvm-project/issues/56902 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129353/new/ https://revie

[PATCH] D128379: [clangd] Change the url for clang-tidy check documentation

2022-08-05 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4c106c93eb68: [clangd] Change the url for clang-tidy check documentation (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128379/new/ h

[PATCH] D130793: [clang-tidy] adjust treating of array-of-pointers when 'AnalyzePointers' is deactivated

2022-08-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp:14 #include "clang/ASTMatchers/ASTMatchers.h" +#include "llvm/Support/Casting.h" Typically don't need this include. Comment at: clang-to

[PATCH] D128372: [Clang-Tidy] Empty Check

2022-08-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:124 + return isa(ND) && + llvm::dyn_cast(ND)->getMinRequiredArguments() == + 0; `dyn_cast` isn't needed here a

[PATCH] D131318: [clang-tidy] Add llvm-derefencing-dyn-cast check

2022-08-06 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, JonasToth, LegalizeAdulthood, alexfh. Herald added subscribers: carlosgalvezp, xazax.hun, mgorny. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added

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

2022-08-06 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, aaron.ballman, LegalizeAdulthood, JonasToth, bzcheeseman. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang-tools-extra. Herald

[PATCH] D131318: [clang-tidy] Add llvm-derefencing-dyn-cast check

2022-08-06 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I had thought about merging this into the prefer-isa-or-dyn-cast in conditionals check, however there just isn't enough cross-over between the 2 and the names wouldn't really match up with what each part of the check does. There could be merit in merging them both into

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

2022-08-07 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 450705. njames93 marked an inline comment as done. njames93 added a comment. Fix documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131319/new/ https://reviews.llvm.org/D131319 Files: clang-tools-

[PATCH] D131386: [clang-tidy] Added `ConstAlignment` option to `misc-const-correctness`

2022-08-08 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, JonasToth. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Adds a

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

2022-08-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/llvm/prefer-isa-or-dyn-cast-in-conditionals.cpp:12-13 template bool isa(Y *); template whisperity wrote: > Will the tests pass properly once the fixes are applied, even

[PATCH] D131590: Fixed page title for abseil-no-internal-dependencies check documentation

2022-08-10 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. Can this be backported as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131590/new/ https://reviews.llvm.org/D131590 ___ cfe-commits maili

[PATCH] D121214: [clang-tidy][docs][NFC] Add alias cert-mem51-cpp to bugprone-shared-ptr-array-mismatch

2022-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Nit: This is not an NFC change CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121214/new/ https://reviews.llvm.org/D121214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[PATCH] D122075: [clang-tidy] Skip parentheses in `readability-make-member-function-const`

2022-03-21 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. Mostly LGTM, just a few nits Comment at: clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp:69 + const Stmt *getParentStmt(const Expr *E) { return getParent(E); } + This chang

[PATCH] D120185: [ASTMatchers] Output currently processing match and nodes on crash

2022-03-21 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 416994. njames93 marked 5 inline comments as done. njames93 added a comment. Rework testing infrastructure. Add more test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120185/new/ https://reviews.llvm.o

[PATCH] D120185: [ASTMatchers] Output currently processing match and nodes on crash

2022-03-21 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 417041. njames93 added a comment. Remove from Decls that aren't NamedDecls Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120185/new/ https://reviews.llvm.org/D120185 Files: clang-tools-extra/docs/ReleaseNo

[PATCH] D120185: [ASTMatchers] Output currently processing match and nodes on crash

2022-03-21 Thread Nathan James 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 rGd89f9e963e49: [ASTMatchers] Output currently processing match and nodes on crash (authored by njames93). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D122102: [clangd] Introduce "add subclass" tweak

2022-03-21 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In its current incarnation, I struggle to see the use case for this. Most of the time Base classes live in header files are pretty much every time this tweak is applied you will then want to move the class. The idea about just implementing the interface I had started in

[PATCH] D120185: [ASTMatchers] Output currently processing match and nodes on crash

2022-03-21 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D120185#3397508 , @thakis wrote: > Looks like this breaks tests on Windows: > http://45.33.8.238/win/54785/step_7.txt > > Please take a look, and revert for now if takes a while to fix. Seems to be that on windows we aren't

[PATCH] D118927: [clang-tidy] Fix invalid fix-it for cppcoreguidelines-prefer-member-initializer

2022-04-07 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd0fcbb37838a: [clang-tidy] Fix invalid fix-it for cppcoreguidelines-prefer-member-initializer (authored by njames93). Herald added a project: All. Changed prior to commit: https://reviews.llvm.org/D1189

[PATCH] D97121: [clang-tidy] Add a Standalone diagnostics mode to clang-tidy

2022-04-07 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 421310. njames93 added a comment. Herald added a project: All. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97121/new/ https://reviews.llvm.org/D97121 Files: clang-tools-extra/clang-tidy/ClangTidyCh

[PATCH] D101624: [clang-tidy] Make performance-inefficient-vector-operation work on members

2022-04-07 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Herald added a project: All. Ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101624/new/ https://reviews.llvm.org/D101624 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D94942: [clangd] Add tweak for implementing abstract class

2022-04-07 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 421371. njames93 added a comment. Use new tweak InsertionPoint logic. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94942/new/ https://reviews.llvm.org/D94942 Files: clang-tools-extra/clangd/refactor/tweaks

[PATCH] D123349: [clang-tidy] Deal with keyword tokens in preprocessor conditions

2022-04-07 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:281 +inline StringRef getTokenName(const Token &Tok) { + return Tok.is(tok::raw_identifier) ? Tok.getRawIdentifier() inline is pretty redundant here. Did yo

[PATCH] D101624: [clang-tidy] Make performance-inefficient-vector-operation work on members

2022-04-08 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0e0b0feff194: [clang-tidy] Make performance-inefficient-vector-operation work on members (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D101624?vs=341877&id=421508#toc Reposi

[PATCH] D123479: [clang-tidy] Support parenthesized literals in modernize-macro-to-enum

2022-04-11 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Would it not be better if these parens were stripped in the fixit as they are unnecessary in the enum value decl? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123479/new/ https://reviews.llvm.org/D123479 ___

[PATCH] D97121: [clang-tidy] Add a Standalone diagnostics mode to clang-tidy

2022-04-14 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D97121#3448467 , @aaron.ballman wrote: > I'd like to hear from @sammccall as well, but I think the changes here LGTM. > Can you please add a release note for the fix? Is this a clang-tidy, clangd or both release notes. The c

[PATCH] D97121: [clang-tidy] Add a Standalone diagnostics mode to clang-tidy

2022-04-16 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 423230. njames93 added a comment. Added clangd release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97121/new/ https://reviews.llvm.org/D97121 Files: clang-tools-extra/clang-tidy/ClangTidyCheck.h

[PATCH] D97121: [clang-tidy] Add a Standalone diagnostics mode to clang-tidy

2022-04-16 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb859c39c40a7: [clang-tidy] Add a Standalone diagnostics mode to clang-tidy (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97121/new/

[PATCH] D123926: [clang] Add a raw_ostream operator<< overload for QualType

2022-04-18 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: rsmith, dblaikie, aaron.ballman. Herald added a subscriber: martong. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Under the hood this prints

[PATCH] D123926: [clang] Add a raw_ostream operator<< overload for QualType

2022-04-20 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 423955. njames93 added a comment. Address nits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123926/new/ https://reviews.llvm.org/D123926 Files: clang/include/clang/AST/Type.h clang/include/clang/StaticA

[PATCH] D123926: [clang] Add a raw_ostream operator<< overload for QualType

2022-04-20 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added inline comments. Comment at: clang/include/clang/AST/Type.h:1319 +llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const clang::QualType &QT); + aaron.ballman wrote: > Cleaning up the declaration a

[PATCH] D123926: [clang] Add a raw_ostream operator<< overload for QualType

2022-04-20 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. njames93 marked an inline comment as done. Closed by commit rGcfb8169059c8: [clang] Add a raw_ostream operator<< overload for QualType (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D118520: [clang-tidy] Output currently processing check and nodes on crash

2022-02-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 405581. njames93 added a comment. Herald added a subscriber: mgorny. Add testing infrastructure to verify stack trace output Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118520/new/ https://reviews.llvm.org/D

[PATCH] D118520: [clang-tidy] Output currently processing check and nodes on crash

2022-02-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/CMakeLists.txt:100 + + llvm_add_library( + CTCrashTestTrace Fairly certain llvm_add_library isnt the correct function to use as that will put the test module in the build/lib directory. How

[PATCH] D117306: [clang-tidy] Add new check 'shared-ptr-array-mismatch'.

2022-02-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SmartPtrArrayMismatchCheck.cpp:41-47 + const Decl *ParentDecl = ConstructParents.begin()->get(); + if (!ParentDecl) +return nullptr; + if (const auto *ParentVar = dyn_cast(ParentDecl)) +

[PATCH] D118900: [ASTMatchers] Expand isInline matcher to VarDecl

2022-02-03 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: klimek, aaron.ballman. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add support to the `isInline` matcher for C++17's inline variables. Repository: rG LLVM Github Mon

[PATCH] D118520: [clang-tidy] Output currently processing check and nodes on crash

2022-02-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 405636. njames93 edited the summary of this revision. njames93 added a comment. Ignore the CTCrashTestTrace implementation file in the lit tests, Fixes 'Test has no 'RUN'' error. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D118927: [clang-tidy] Fix invalid fix-it for cppcoreguidelines-prefer-member-initializer

2022-02-03 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: LegalizeAdulthood, aaron.ballman, alexfh. Herald added subscribers: carlosgalvezp, shchenz, kbarton, xazax.hun, nemanjai. njames93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-c

[PATCH] D118782: clangd: Add a break for every case in the PopulateSwitch tweak

2022-02-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/PopulateSwitch.cpp:208-209 Text.append({EnumD->getName(), "::"}); Text.append({EnumConstant.second.getEnumConstant()->getName(), ":"}); +Text += "break;"; }

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2022-02-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added a subscriber: sammccall. njames93 added a comment. In D54943#3296191 , @JonasToth wrote: > In D54943#3292552 , @0x8000- > wrote: > >> @aaron.ballman - can this land for Clang14, or does it have w

[PATCH] D118927: [clang-tidy] Fix invalid fix-it for cppcoreguidelines-prefer-member-initializer

2022-02-04 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 405919. njames93 added a comment. Rename test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118927/new/ https://reviews.llvm.org/D118927 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMem

[PATCH] D118927: [clang-tidy] Fix invalid fix-it for cppcoreguidelines-prefer-member-initializer

2022-02-04 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-prefer-member-initializer.cpp:550 + // CHECK-FIXES-NEXT: } + PR53515(PR53515 &&Other) : M() { +M = Other.M;

[PATCH] D118104: Make run-clang-tidy.py print the configured checks correctly

2022-02-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D118104#3296340 , @salman-javed-nz wrote: > In D118104#3292862 , @JesApp wrote: > >> Well, since this was more of source of confusion than actual incorrect >> behaviour, I don't thin

[PATCH] D118782: clangd: Add a break for every case in the PopulateSwitch tweak

2022-02-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. The only way I'd suggest supporting this is via an option in config(like we do with the add using tweak), but I don't think even then it would get much use. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118782/new/ https:

[PATCH] D118922: [ASTMatchers] The `isInline` matcher now accepts inline variables

2022-02-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I had the same idea in D118900 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118922/new/ https://reviews.llvm.org/D118922 ___ cfe-commits mail

[PATCH] D118520: [clang-tidy] Output currently processing check and nodes on crash

2022-02-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added a subscriber: thakis. njames93 added a comment. @thakis I tried to test this on the gn build and got no issues, however I'm aware that the CTCrashTestTrace plugin isn't even compiled on the gn build. Not sure its worth the effort fixing that. The lit test should be disabled anyway

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2022-02-07 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.cpp:102-105 + // There have been crashes on 'Variable == nullptr', even though the matcher + // is not conditional. This comes probably from 'findAll'-matching. +

[PATCH] D124320: [clang-tidy] Add createChecks method that also checks for LangaugeOptions

2022-04-23 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added a reviewer: aaron.ballman. Herald added subscribers: carlosgalvezp, usaxena95, kadircet, arphaman, xazax.hun. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber

[PATCH] D124320: [clang-tidy] Add createChecks method that also checks for LangaugeOptions

2022-04-23 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 424694. njames93 added a comment. Remove unnecessary copy of LanguageOptions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124320/new/ https://reviews.llvm.org/D124320 Files: clang-tools-extra/clang-tidy/C

[PATCH] D124341: [clang-tidy][NFC] Replace many instances of std::string where a StringRef would suffice.

2022-04-24 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: carlosgalvezp, arphaman, kbarton, xazax.hun, nemanjai. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github

[PATCH] D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables

2022-04-24 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp:103 + +#if 0 + // FIXME: Remove this section if there are no crashes after the iterator-fix. Hasn't this already been addressed, if so can this block just be

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-04-26 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:453 +diag(CallOrRef->getBeginLoc(), + "functions with other than C linkage are not allowed as signal " + "handler (until C++17)"); s/with

[PATCH] D124341: [clang-tidy][NFC] Replace many instances of std::string where a StringRef would suffice.

2022-04-27 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D124341#3475083 , @aaron.ballman wrote: > I went through the changes and they look correct to me... yet I'm still > mildly terrified. :-D Have you tried running clang-tidy through its paces > with ASan/MSan enabled to see i

[PATCH] D124650: [clang-tidy] Simplify boolean expressions by DeMorgan's theorem

2022-05-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:586 + + auto Not = hasOperatorName("!"); + auto Or = hasOperatorName("||"); This whole implementation would be alot simpler(and likely faster) if

[PATCH] D124650: [clang-tidy] Simplify boolean expressions by DeMorgan's theorem

2022-05-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:586 + + auto Not = hasOperatorName("!"); + auto Or = hasOperatorName("||"); njames93 wrote: > This whole implementation would be alot simpler(and

[PATCH] D124650: [clang-tidy] Simplify boolean expressions by DeMorgan's theorem

2022-05-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:598-599 + auto UnlessNotLHS = unless(hasLHS(NotOp)); + // match !(!a || b) + Finder->addMatcher(unaryOperator(Not, hasUnaryOperand(binaryOperator( +

<    1   2   3   4   5   6   7   8   9   10   >