[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-19 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked 2 inline comments as done. ccotter added a comment. Would someone with merge access mind committing this? I double checked and this diff can be applied on the latest upstream/main. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

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

2023-01-17 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 490028. ccotter marked an inline comment as done. ccotter added a comment. - fix merge Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140760/new/ https://reviews.llvm.org/D140760 Files: clang-tools-extra/clan

[PATCH] D141892: Implement modernize-use-constraints

2023-01-17 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. In D141892#4058273 , @njames93 wrote: > In D141892#4057722 , @ccotter wrote: > >> 2. replace the non `_v` templates to the `_v` variants `is_same` -> >> `is_same_v` or the equivalent conc

[PATCH] D141892: Implement modernize-use-constraints

2023-01-16 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. Overall, we could eventually upgrade code in three stages, each a separate reusable check. 1. enable_if -> requires clauses 2. replace the non `_v` templates to the `_v` variants `is_same` -> `is_same_v` or the equivalent concept `same_as` 3. replace requires clause on

[PATCH] D141892: Implement modernize-use-constraints

2023-01-16 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. For the sake of demonstration, https://github.com/llvm/llvm-project/commit/9c556ce59edf5a4293d4497d5815544afc0eb878 is the result of running this tool on all headers under clang/include/clang and llvm/include/llvm. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D141892: Implement modernize-use-constraints

2023-01-16 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added a subscriber: carlosgalvezp. Herald added a reviewer: njames93. Herald added a project: All. ccotter requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Add new check to replace enable_if

[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18

2023-01-13 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 489174. ccotter added a comment. - Match unresolved calls to move Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141569/new/ https://reviews.llvm.org/D141569 Files: clang-tools-extra/clang-tidy/cppcoreguideli

[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18

2023-01-13 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 489007. ccotter added a comment. - two more tests - Minimize test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141569/new/ https://reviews.llvm.org/D141569 Files: clang-tools-extra/clang-tidy/cppcoreguideli

[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18

2023-01-13 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved.cpp:3-35 +// NOLINTBEGIN +namespace std { +template +struct remove_reference; + +template +struct remove_reference { ccotte

[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18

2023-01-13 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved.cpp:3-35 +// NOLINTBEGIN +namespace std { +template +struct remove_reference; + +template +struct remove_reference { njames

[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18

2023-01-13 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. > What happens with code like this > > void foo(bar&& B) { > std::move(B); > } My new check does not flag this function, although it looks like another check flagged the move expression: `ignoring return value of function declared with const attribute [clang-dia

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-13 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. My latest update to the diff was the result of a rebase, then addressing the final comments. What I've been doing is something like git pull upstream main --rebase # make more edits git commit -am arc diff --update D141133 upstream/main I'm not sure if this

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-13 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked 2 inline comments as done. ccotter added a comment. Thanks for pointing that out. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 ___ cfe-commits

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-13 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 488943. ccotter added a comment. - Finish stengthening CHECK-FIXES Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clang-tools-extra/clang-tidy/cppcoreguide

[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 488497. ccotter added a comment. - Does not offer fixits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141569/new/ https://reviews.llvm.org/D141569 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/CMake

[PATCH] D141570: [clang] Add no-argument dump to DynTypedNode

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. I usually use `dump()` when authoring/debugging clang-tidy or similar checks. I don't always have ASTContext handy when working with a DynTypedNode (without temporarily changing my call stack to pass the ASTContext around for the purposes of `dump`). I put up this as a

[PATCH] D141570: [clang] Add no-argument dump to DynTypedNode

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 488495. ccotter added a comment. remove accidental change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141570/new/ https://reviews.llvm.org/D141570 Files: clang/include/clang/AST/ASTTypeTraits.h clang/lib

[PATCH] D141570: [clang] Add no-argument dump to DynTypedNode

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 488494. ccotter added a comment. format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141570/new/ https://reviews.llvm.org/D141570 Files: clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp clang/in

[PATCH] D141570: [clang] Add no-argument dump to DynTypedNode

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added a subscriber: carlosgalvezp. Herald added a reviewer: njames93. Herald added a project: All. ccotter requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. Provide a no-argument dump me

[PATCH] D141569: Implement CppCoreGuideline F.18

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added subscribers: carlosgalvezp, shchenz, kbarton, nemanjai. Herald added a reviewer: njames93. Herald added a project: All. ccotter requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Warn whe

[PATCH] D141463: [clang-tidy] Improve rename_check.py

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked an inline comment as done. ccotter added inline comments. Comment at: clang-tools-extra/clang-tidy/rename_check.py:75 print("Renaming '%s' -> '%s'..." % (fileName, newFileName)) - os.rename(fileName, newFileName) + subprocess.check_call(["git", "mv", fileName,

[PATCH] D141463: [clang-tidy] Improve rename_check.py

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 488169. ccotter added a comment. - revert git changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141463/new/ https://reviews.llvm.org/D141463 Files: clang-tools-extra/clang-tidy/rename_check.py Index: c

[PATCH] D141463: [clang-tidy] Improve rename_check.py

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added inline comments. Comment at: clang-tools-extra/clang-tidy/rename_check.py:97 def getListOfFiles(clang_tidy_path): - files = glob.glob(os.path.join(clang_tidy_path, '*')) - for dirname in files: -if os.path.isdir(dirname): - files += glob.glob(os.path.joi

[PATCH] D141463: [clang-tidy] Improve rename_check.py

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. I tested with https://reviews.llvm.org/D141133 where I renamed my new check, but noticed rename_tool.py did not rename or update the check name in the test file. The result of running the updated script against my tool is on github: https://github.com/ccotter/llvm-proje

[PATCH] D141463: [clang-tidy] Improve rename_check.py

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. ccotter requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. rename_check.py now find

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 488085. ccotter added a comment. - Rename test to match check name Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clang-tools-extra/clang-tidy/cppcoreguide

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 488084. ccotter added a comment. - clang-format - Show whether 'this' is implicitly captured - fix docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clan

[PATCH] D141391: [NFC] [clang-tools-extra] Alphabetize clang-tidy release notes

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487813. ccotter added a comment. - merge from upstream Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141391/new/ https://reviews.llvm.org/D141391 Files: clang-tools-extra/docs/ReleaseNotes.rst Index: clang

[PATCH] D141391: [NFC] [clang-tools-extra] Alphabetize clang-tidy release notes

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. I can't land these myself, so if you are able to, would you mind doing so? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141391/new/ https://reviews.llvm.org/D141391 ___

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

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked an inline comment as done. ccotter added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:219 +- Improved :doc:`modernize-loop-convert ` to + refactor container based for loops that initialize iterators with free function calls

[PATCH] D141391: [NFC] [clang-tools-extra] Alphabetize clang-tidy release notes

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added a reviewer: njames93. Herald added a project: All. ccotter requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Alphabetize order of clang-tidy release notes, and fix `:doc:` link. Reposi

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

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487807. ccotter added a comment. - alpha Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140760/new/ https://reviews.llvm.org/D140760 Files: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp clang-

[PATCH] D140794: [ASTMatcher] Add coroutineBodyStmt matcher

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5503 + FunctionDecl, + CoroutineBodyStmt), interna

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

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487794. ccotter added a comment. - [clang-tidy] Support begin/end free functions in modernize-loop-convert - Add release note - Update docs - Fix tests - Remove unused variable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D140794: [ASTMatcher] Add coroutineBodyStmt matcher

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487789. ccotter added a comment. - Fix ParserTest.Errors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140794/new/ https://reviews.llvm.org/D140794 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AS

[PATCH] D140307: [clang-tidy] Match derived types in in modernize-loop-convert

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. Rebased! Sorry for the multiple diffs on this phab - I'm still getting the hang of `arc diff`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140307/new/ https://reviews.llvm.org/D140307 ___

[PATCH] D140307: [clang-tidy] Match derived types in in modernize-loop-convert

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487781. ccotter added a comment. rebase? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140307/new/ https://reviews.llvm.org/D140307 Files: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp clang-

[PATCH] D140307: [clang-tidy] Match derived types in in modernize-loop-convert

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487778. ccotter added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140307/new/ https://reviews.llvm.org/D140307 Files: clang-tools-extra/docs/ReleaseNotes.rst Index: clang-tools-extra/do

[PATCH] D140794: [ASTMatcher] Add coroutineBodyStmt matcher

2023-01-09 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487661. ccotter marked an inline comment as not done. ccotter added a comment. - Add hasBody matcher support for coroutineBodyStmt - update doc - Sort list - clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D140794: [ASTMatcher] Add coroutineBodyStmt matcher

2023-01-09 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5503 + FunctionDecl, + CoroutineBodyStmt), interna

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-08 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487195. ccotter added a comment. - tidy up docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCaptureD

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-08 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked an inline comment as done. ccotter added a comment. Thanks! I opted for 'avoid-capture-default-when-capturing-this' and updated the name and docs etc in the most recent diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-08 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487193. ccotter added a comment. - rename to avoid-capture-deafult-when-capturing-this Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clang-tools-extra/cla

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-08 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487189. ccotter added a comment. - Use const& Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCaptureThi

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked 2 inline comments as done. ccotter added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCaptureThisWithCaptureDefaultCheck.cpp:35 +Capture.getLocation(), SourceMgr, Context.getLangOpts(), tok::amp); +llvm::errs

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487130. ccotter added a comment. - rm trace; tidy docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidC

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-capture-this-with-capture-default.cpp:9 +auto explicit_this_capture = [=, this]() { }; +// CHECK-MESSAGES: :[[@LINE-1]]:35: warning: lambdas that capture this s

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked an inline comment as done and an inline comment as not done. ccotter added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-capture-this-with-capture-default.cpp:9 +auto explicit_this_capture = [=, this]() { }; +

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked an inline comment as done. ccotter added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-capture-this-with-capture-default.cpp:9 +auto explicit_this_capture = [=, this]() { }; +// CHECK-MESSAGES: :[[@LINE-1]]

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487084. ccotter added a comment. - typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCaptureThisWithC

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487082. ccotter added a comment. oops, bad 'arc diff' again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/A

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487081. ccotter added a comment. - Use "capture default" consistently and update diagnostic message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clang-to

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-06 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 486873. ccotter marked an inline comment as done. ccotter added a comment. - docs feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clang-tools-extra

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-06 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added subscribers: carlosgalvezp, shchenz, kbarton, xazax.hun, nemanjai. Herald added a reviewer: njames93. Herald added a project: All. ccotter requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits

[PATCH] D140307: [clang-tidy] Match derived types in in modernize-loop-convert

2023-01-05 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked an inline comment as done. ccotter added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:258 + hasMethod(cxxMethodDecl(hasName("begin"), isConst())), + hasMethod(cxxMethodDecl(hasN

[PATCH] D140307: [clang-tidy] Match derived types in in modernize-loop-convert

2023-01-05 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked 2 inline comments as done. ccotter added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:258 + hasMethod(cxxMethodDecl(hasName("begin"), isConst())), + hasMethod(cxxMethodDecl(hasN

[PATCH] D140307: [clang-tidy] Match derived types in in modernize-loop-convert

2023-01-05 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 486716. ccotter added a comment. - Match derived types in in modernize-loop-convert - fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140307/new/ https://reviews.llvm.org/D140307 Files: clang-tools-ex

[PATCH] D140772: [clang-tidy] Fix minor bug in add_new_check.py

2023-01-05 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. @carlosgalvezp - could you also help commit this if it looks good? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140772/new/ https://reviews.llvm.org/D140772 ___ cfe-commits mail

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2023-01-02 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked 4 inline comments as done. ccotter added a comment. In D140793#4021694 , @carlosgalvezp wrote: > LGTM, thanks for the patch! Maybe wait a couple days before landing to give > some extra time for other reviewers. You might also want to mar

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2023-01-01 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485827. ccotter added a comment. - oops - bad arc diff / bad change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140793/new/ https://reviews.llvm.org/D140793 Files: clang-tools-extra/clang-tidy/cppcoreguid

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2023-01-01 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485824. ccotter added a comment. - Cleanups Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140793/new/ https://reviews.llvm.org/D140793 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidReferenceCor

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2022-12-31 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485783. ccotter added a comment. - Does not offer fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140793/new/ https://reviews.llvm.org/D140793 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/Avoid

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2022-12-31 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485782. ccotter added a comment. - run clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140793/new/ https://reviews.llvm.org/D140793 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidRefe

[PATCH] D140794: [ASTMatcher] Add coroutineBodyStmt matcher

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485748. ccotter added a comment. - Add hasBody matcher support for coroutineBodyStmt Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140794/new/ https://reviews.llvm.org/D140794 Files: clang/docs/ReleaseNotes.

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485746. ccotter added a comment. spelling Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140793/new/ https://reviews.llvm.org/D140793 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidReferenceCorou

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485745. ccotter added a comment. move reference link Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140793/new/ https://reviews.llvm.org/D140793 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidRef

[PATCH] D140794: Add coroutineBodyStmt matcher

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added a subscriber: ChuanqiXu. Herald added a project: All. ccotter requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The coroutineBodyStmt matcher matches CoroutineBodyStmt AST nodes. Repository: rG

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. Passing and accessing a reference is safe if the access is done before any suspend point (taking into account whether the initial coroutine suspend actually suspends or not). Although CP.53 recommends warning on any reference parameter regardless of whether the code onl

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added subscribers: carlosgalvezp, shchenz, kbarton, xazax.hun, nemanjai. Herald added a reviewer: njames93. Herald added a project: All. ccotter requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits

[PATCH] D140772: [clang-tidy] Fix minor bug in add_new_check.py

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added inline comments. Comment at: clang-tools-extra/clang-tidy/add_new_check.py:324-328 doc_files = [] - for subdir in list(filter(lambda s: not s.endswith('.rst') and not s.endswith('.py'), - os.listdir(docs_dir))): + for subdir in list(filter(

[PATCH] D140772: [clang-tidy] Fix minor bug in add_new_check.py

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485710. ccotter added a comment. Fix isdir check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140772/new/ https://reviews.llvm.org/D140772 Files: clang-tools-extra/clang-tidy/add_new_check.py clang-tools-

[PATCH] D140772: Fix minor bug in add_new_check.py

2022-12-29 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added a subscriber: carlosgalvezp. Herald added a reviewer: njames93. Herald added a project: All. ccotter requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. While rebuilding the list of checks

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

2022-12-29 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485665. ccotter added a comment. - Remove unused variable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140760/new/ https://reviews.llvm.org/D140760 Files: clang-tools-extra/clang-tidy/modernize/LoopConvertC

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

2022-12-29 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485656. ccotter added a comment. oops, redo diff with correct arc diff command Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140760/new/ https://reviews.llvm.org/D140760 Files: clang-tools-extra/clang-tidy/m

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

2022-12-29 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485655. ccotter added a comment. Update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140760/new/ https://reviews.llvm.org/D140760 Files: clang-tools-extra/test/clang-tidy/checkers/modernize/loop-conve

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

2022-12-29 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485643. ccotter added a comment. Update docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140760/new/ https://reviews.llvm.org/D140760 Files: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp cl

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

2022-12-29 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. In D140760#4019680 , @Eugene.Zelenko wrote: > I just look into check documentation, new feature should be described with > example there too. Would you mind clarifying where I should add documentation to? In the release notes,

[PATCH] D140307: [clang-tidy] Match derived types in in modernize-loop-convert

2022-12-29 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485637. ccotter added a comment. Add release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140307/new/ https://reviews.llvm.org/D140307 Files: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp

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

2022-12-29 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485634. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140760/new/ https://reviews.llvm.org/D140760 Files: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp clang-tools-extra/docs/ReleaseNotes.rst

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

2022-12-29 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. ccotter added a project: clang-tools-extra. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. ccotter requested review of this revision. Herald added a subscriber: cfe-commits. The modernize-loop-conve

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2022-12-28 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. @Febbe - Really glad to see this phab up! Not having realized this phab was in progress, I implemented this a few months back (though, originally not as a clang-tidy tool and never published) and thought it'd be worth sharing notes. I recently turned my non-clang-tidy i

[PATCH] D140307: Match derived types in in modernize-loop-convert

2022-12-27 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. @njames93 would you mind taking a look? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140307/new/ https://reviews.llvm.org/D140307 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D140307: Match derived types in in modernize-loop-convert

2022-12-19 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added a subscriber: carlosgalvezp. Herald added a reviewer: njames93. Herald added a project: All. ccotter requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. This patch allows clang-tidy to rep

<    1   2   3