[PATCH] D96113: [ASTMatchers] Fix hasParent while ignoring unwritten nodes

2021-02-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 321990. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96113/new/ https://reviews.llvm.org/D96113 Files: clang/include/clang/AST/ParentMapContext.h clang/lib/AST/ParentMapC

[PATCH] D96114: [ASTMatchers] Fix parent-child traversal between functions and parms

2021-02-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 321991. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96114/new/ https://reviews.llvm.org/D96114 Files: clang/include/clang/AST/RecursiveASTVisitor.h clang/lib/AST/ParentM

[PATCH] D96142: [clang-tidy] Simplify too-small loop variable check

2021-02-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 321997. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96142/new/ https://reviews.llvm.org/D96142 Files: clang-tools-extra/clang-tidy/bugprone/TooSmallLoopVariableCheck.cpp

[PATCH] D96142: [clang-tidy] Simplify too-small loop variable check

2021-02-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D96142#2545078 , @njames93 wrote: > I'm not sure about this. The warning is good and addresses a real problem. Well, I've made the diagnostic better anyway. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D96222: [clang-tidy] Simplify redundant smartptr get check

2021-02-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added subscribers: nullptr.cpp, xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://rev

[PATCH] D96223: [clang-tidy] Simplify static assert check

2021-02-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added subscribers: nullptr.cpp, xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://rev

[PATCH] D96224: [clang-itdy] Simplify virtual near-miss check

2021-02-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added a subscriber: nullptr.cpp. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Diagnose the problem in templates in the context of the temp

[PATCH] D96082: [clang-tidy] Add 'readability-useless-return-value' check

2021-02-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D96082#2545807 , @LukasHanel wrote: > Hi, thanks for discussing my proposal! > Although I think it can stand as is, I was looking for feedback: > > - Is the name good? > - Is the `readability` group good? Or better in `misc`?

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-02-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D69560#2536597 , @whisperity wrote: > In D69560#2536570 , @steveire wrote: > >> I haven't read through all the comments, but the word 'easily' implies >> 'desirable'. This check seems t

[PATCH] D96223: [clang-tidy] Simplify static assert check

2021-02-13 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1709bb8c7395: [clang-tidy] Simplify static assert check (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D96223?vs=322000&id=323549#toc Repository: rG LLVM Github Monorep

[PATCH] D96139: [clang-tidy] Simplify inaccurate erase check

2021-02-13 Thread Stephen Kelly 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 rGf2f920b987f3: [clang-tidy] Simplify inaccurate erase check (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D96139?vs

[PATCH] D96138: [clang-tidy] Simplify delete null ptr check

2021-02-13 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 323551. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96138/new/ https://reviews.llvm.org/D96138 Files: clang-tools-extra/clang-tidy/readability/DeleteNullPointerCheck.cpp

[PATCH] D96082: [clang-tidy] Add 'readability-useless-return-value' check

2021-02-13 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D96082#2550468 , @LukasHanel wrote: > In D96082#2549943 , @steveire wrote: > >> In D96082#2545807 , @LukasHanel >> wrote: >> >>> Hi, thanks for

[PATCH] D96665: Revert "Implement nullPointerConstant() using a better API."

2021-02-14 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This reverts commit 9148302a (2019-08-22) which broke the pre-existing unit test for the matcher. A

[PATCH] D96725: [clang-tidy] Fix modernize-use-using in extern C code

2021-02-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp:305 }; + +extern "C" { Can you add tests for typedefs in other scopes like ``` extern "C" { typedef int CType; struct CAnother { }; typedef struct

[PATCH] D96725: [clang-tidy] Fix modernize-use-using in extern C code

2021-02-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire accepted this revision. steveire added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp:305 }; + +extern "C" { njames93 wrote: > steveire wrote: > > Can you

[PATCH] D96082: [clang-tidy] Add 'readability-useless-return-value' check

2021-02-16 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D96082#2565339 , @aaron.ballman wrote: > A somewhat similar check that would be interesting is a function that returns > the same value on all control paths I think we shouldn't try to design a new, different check in the co

[PATCH] D96142: [clang-tidy] Simplify too-small loop variable check

2021-02-16 Thread Stephen Kelly via Phabricator via cfe-commits
steveire abandoned this revision. steveire added a comment. In D96142#2564265 , @njames93 wrote: > In D96142#2547418 , @steveire wrote: > >> In D96142#2545078 , @njames93 wro

[PATCH] D96138: [clang-tidy] Simplify delete null ptr check

2021-02-17 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd20961c6575c: [clang-tidy] Simplify delete null ptr check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96138/new/ https://revie

[PATCH] D96140: [clang-tidy] Simplify inefficient algorithm check

2021-02-17 Thread Stephen Kelly 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 rG6c2eca96a2a5: [clang-tidy] Simplify inefficient algorithm check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D96141: [clang-tidy] Simplify const params check

2021-02-17 Thread Stephen Kelly 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 rGca4485d9fc34: [clang-tidy] Simplify const params check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D96113: [ASTMatchers] Fix hasParent while ignoring unwritten nodes

2021-02-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 324396. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96113/new/ https://reviews.llvm.org/D96113 Files: clang/include/clang/AST/ParentMapContext.h clang/lib/AST/ParentMapC

[PATCH] D96113: [ASTMatchers] Fix hasParent while ignoring unwritten nodes

2021-02-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/lib/AST/ParentMapContext.cpp:174 +{ + auto AncestorNodes = matchParents( + ParentList, this); aaron.ballman wrote: > Not needing to be solved in this patch, but do we eventually need

[PATCH] D96113: [ASTMatchers] Fix hasParent while ignoring unwritten nodes

2021-02-18 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe4d5f00093be: [ASTMatchers] Fix hasParent while ignoring unwritten nodes (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96113/new/

[PATCH] D97095: [ASTMatchers] Fix hasUnaryOperand matcher for postfix operators

2021-02-19 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D97095 Files: clang/include/clang/ASTMatch

[PATCH] D96131: [clang-tidy] Simplify function complexity check

2021-02-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp:505 + functionDecl(isDefinition(), unless(isWeak())).bind("func"), this); + Finder->addMatcher(lambdaExpr().bind("lambda"), this); }

[PATCH] D96132: [clang-tidy] Simplify throw keyword missing check

2021-02-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-throw-keyword-missing.cpp:97-107 +template +void templ(int i) { + if (i > 0) +SomeType(); +} + void funcCallWithTempExcTest() { njames93 wrote: > Can I ask wha

[PATCH] D96132: [clang-tidy] Simplify throw keyword missing check

2021-02-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-throw-keyword-missing.cpp:97-107 +template +void templ(int i) { + if (i > 0) +SomeType(); +} + void funcCallWithTempExcTest() { steveire wrote: > njames93 wrot

[PATCH] D96665: Revert "Implement nullPointerConstant() using a better API."

2021-02-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. As discussed elsewhere, the bots are not broken. The changes reverted here were made in 2019. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96665/new/ https://reviews.llvm.org/D96665 _

[PATCH] D96665: Revert "Implement nullPointerConstant() using a better API."

2021-02-20 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6984e0d43985: Revert "Implement nullPointerConstant() using a better API." (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96665/ne

[PATCH] D97095: [ASTMatchers] Fix hasUnaryOperand matcher for postfix operators

2021-02-20 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG559f3728441d: [ASTMatchers] Fix hasUnaryOperand matcher for postfix operators (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97095

[PATCH] D96131: [clang-tidy] Simplify function complexity check

2021-02-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 325216. steveire added a comment. Trigger rebuild Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96131/new/ https://reviews.llvm.org/D96131 Files: clang-tools-extra/clang-tidy/readability/FunctionCognitiveCo

[PATCH] D96131: [clang-tidy] Simplify function complexity check

2021-02-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 325226. steveire added a comment. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96131/new/ https://reviews.llvm.org/D96131 Files: clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexit

[PATCH] D96135: [clang-tidy] Simplify braced init check

2021-02-20 Thread Stephen Kelly 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 rGe8b8f8960246: [clang-tidy] Simplify braced init check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D96224: [clang-itdy] Simplify virtual near-miss check

2021-02-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 325232. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96224/new/ https://reviews.llvm.org/D96224 Files: clang-tools-extra/clang-tidy/bugprone/VirtualNearMissCheck.cpp clan

[PATCH] D96224: [clang-itdy] Simplify virtual near-miss check

2021-02-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. > What happens when TBase is an explicit specialization. It's not changed before or after this patch. This check is documented as changing code based on the derived classes based on typos of methods overridden from the base. Your suggestion makes sense to me, but it i

[PATCH] D96224: [clang-itdy] Simplify virtual near-miss check

2021-02-20 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9a4b574dd6a0: [clang-itdy] Simplify virtual near-miss check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96224/new/ https://rev

[PATCH] D96131: [clang-tidy] Simplify function complexity check

2021-02-20 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6852a29a3b5b: [clang-tidy] Simplify function complexity check (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D96131?vs=325226&id=325241#toc Repository: rG LLVM Github M

[PATCH] D96132: [clang-tidy] Simplify throw keyword missing check

2021-02-20 Thread Stephen Kelly 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 rG77056fe58e83: [clang-tidy] Simplify throw keyword missing check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D96222: [clang-tidy] Simplify redundant smartptr get check

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 325283. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96222/new/ https://reviews.llvm.org/D96222 Files: clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cp

[PATCH] D96222: Handle uninstantiated templates in redundant get check

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp:21-45 + return expr( + anyOf(cxxMemberCallExpr( + on(expr(anyOf(hasType(OnClass), + hasType(q

[PATCH] D97142: [clang-tidy] Simplify unused RAII check

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added a subscriber: xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix handling of default construction where the constructor has

[PATCH] D97144: [clang-tidy] Simplify shrink to fit check

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added a subscriber: xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.or

[PATCH] D97145: [clang-tidy] Simplify default member init check

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added a subscriber: xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.or

[PATCH] D97147: [clang-tidy] Simplify redundant member init check

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added a subscriber: xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.or

[PATCH] D97149: [clang-tidy] Simplify suspicious enum usage check

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added a subscriber: xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.or

[PATCH] D97150: [clang-tidy] Simplify suspicious memset usage check

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added a subscriber: xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.or

[PATCH] D97151: [clang-tidy] Simplify redundant branch condition check

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added a subscriber: xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.or

[PATCH] D97152: [clang-tidy] Simplify special member functions check

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added subscribers: kbarton, xazax.hun, nemanjai. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https

[PATCH] D97153: [clang-tidy] Simplify boolean expr scheck

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added a subscriber: xazax.hun. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.or

[PATCH] D97156: [ASTMatchers] Make Param functors variadic

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D97156 Files: clang/include/clang

[PATCH] D97156: [ASTMatchers] Make Param functors variadic

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. This was part of an early attempt to implement `mapAnyOf`. It's not needed, but it seems like a better idea to have one variadic class than multiple Param1/2 classes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97156/ne

[PATCH] D97156: [ASTMatchers] Make Param functors variadic

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 325319. steveire added a comment. Update comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97156/new/ https://reviews.llvm.org/D97156 Files: clang/include/clang/ASTMatchers/ASTMatchers.h clang/includ

[PATCH] D97158: [ASTMatchers] Make nullPointerConstant usable at top-level

2021-02-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D97158 Files: clang/include/clang

[PATCH] D97158: [ASTMatchers] Make nullPointerConstant usable at top-level

2021-02-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 325398. steveire added a comment. Update docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97158/new/ https://reviews.llvm.org/D97158 Files: clang/docs/LibASTMatchersReference.html clang/include/clang/AS

[PATCH] D97156: [ASTMatchers] Make Param functors variadic

2021-02-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 325409. steveire added a comment. Update dump script Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97156/new/ https://reviews.llvm.org/D97156 Files: clang/docs/tools/dump_ast_matchers.py clang/include/cla

[PATCH] D97156: [ASTMatchers] Make Param functors variadic

2021-02-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Good catch! Updated the docs generating script. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97156/new/ https://reviews.llvm.org/D97156 ___ cfe-commits mailing list cfe-commits

[PATCH] D96114: [ASTMatchers] Fix parent-child traversal between functions and parms

2021-02-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D96114#2548029 , @klimek wrote: > Can you explain the change and the before/after a bit more? Thanks! I'm not sure. Can you ask a more-specific question? Did you read the link that Nathan posted? Is the unit test unclear? R

[PATCH] D96665: Revert "Implement nullPointerConstant() using a better API."

2021-02-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D96665#2578718 , @goncharov wrote: > I have relanded this in > https://github.com/llvm/llvm-project/commit/3b148d6f991181a1b8f089c4bc2126e1a6c1212d > . My apologies @goncharov Why did you revert this change? Repository:

[PATCH] D96665: Revert "Implement nullPointerConstant() using a better API."

2021-02-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D96665#2578635 , @goncharov wrote: > Hi @steveire! Sorry but I reverted this revert. Could you please give some > context of "discussed elsewhere" and "pre-existing unit test for the > matcher"? @aaron.ballman for cc @njames

[PATCH] D96665: Revert "Implement nullPointerConstant() using a better API."

2021-02-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D96665#2579422 , @steveire wrote: > In D96665#2578635 , @goncharov wrote: > >> Hi @steveire! Sorry but I reverted this revert. Could you please give some >> context of "discussed elsewh

[PATCH] D97121: [clang-tidy] Add a single fix mode to clang-tidy

2021-02-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. I just tried to apply this, but I think it conflicts with your other change to `PreferMemberInitializerCheck.cpp`. Please rebase it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97121/new/ https://reviews.llvm.org/D97121

[PATCH] D97121: [clang-tidy] Add a single fix mode to clang-tidy

2021-02-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.h:514 const LangOptions &getLangOpts() const { return Context->getLangOpts(); } + /// Returns true when the check is ran in a use case when only 1 fix will be + /// applied at a time. ---

[PATCH] D97121: [clang-tidy] Add a single fix mode to clang-tidy

2021-02-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp:81 +if (InsertedHeaders[FileID].contains(Header)) + return llvm::None; + } else if (!InsertedHeaders[FileID].insert(Header).second) njames93 wrote: > stev

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2021-08-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Making a separate tool for this makes no sense. Especially as you are only proposing it to satisfy one (or are there more) vocal objector. The objections to this make no sense. If you don't want to use it, then don't enable it. That principle applies whether "the way t

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2021-07-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. @MyDeveloperDay Does anything prevent this being merged, instead of just rebased? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69764/new/ https://reviews.llvm.org/D69764 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2021-07-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D69764#2863266 , @aaron.ballman wrote: > In D69764#2863213 , @steveire wrote: > >> @MyDeveloperDay Does anything prevent this being merged, instead of just >> rebased? > > Please see

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2021-07-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D69764#2867109 , @MyDeveloperDay wrote: > In D69764#2863648 , @owenpan wrote: > >> Has this been tested against a large code base? It also needs an unqualified >> LGTM before it can be

[PATCH] D93164: [AST] Add generator for source location introspection

2021-11-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/lib/Tooling/CMakeLists.txt:29-30 +if (NOT Python3_EXECUTABLE +OR WIN32 +OR APPLE +OR GENERATOR_IS_MULTI_CONFIG smeenai wrote: > I'm looking at this commit in the context of > https://bugs.llvm.org/sho

[PATCH] D96222: Handle uninstantiated templates in redundant get check

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa5e3d87f66a1: [clang-tidy] Handle uninstantiated templates in redundant get check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D9

[PATCH] D97144: [clang-tidy] Simplify shrink to fit check

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG296c6e85c19b: [clang-tidy] Simplify shrink to fit check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97144/new/ https://reviews

[PATCH] D97145: [clang-tidy] Simplify default member init check

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9ba557cc0370: [clang-tidy] Simplify default member init check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97145/new/ https://r

[PATCH] D97147: [clang-tidy] Simplify redundant member init check

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG35763baf9aa9: [clang-tidy] Simplify redundant member init check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97147/new/ https:/

[PATCH] D97149: [clang-tidy] Simplify suspicious enum usage check

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdf42f9950d5e: [clang-tidy] Simplify suspicious enum usage check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97149/new/ https:/

[PATCH] D97151: [clang-tidy] Simplify redundant branch condition check

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa5feefa3c72e: [clang-tidy] Simplify redundant branch condition check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97151/new/ ht

[PATCH] D97152: [clang-tidy] Simplify special member functions check

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb67287088664: [clang-tidy] Simplify special member functions check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97152/new/ http

[PATCH] D97153: [clang-tidy] Simplify boolean expr check

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG302cc8421ee4: [clang-tidy] Simplify boolean expr check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97153/new/ https://reviews.

[PATCH] D97150: [clang-tidy] Simplify suspicious memset usage check

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG42ce00ec3947: [clang-tidy] Simplify suspicious memset usage check (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97150/new/ https

[PATCH] D97246: [ASTMatchers] Fix matching failure in IgnoreUnlessSpelledInSource mode

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4358 internal::Matcher, InnerMatcher) { - auto MatchIt = matchesFirstInPointerRange(InnerMatcher, Node.init_begin(), -Node.init_en

[PATCH] D97246: [ASTMatchers] Fix matching failure in IgnoreUnlessSpelledInSource mode

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire accepted this revision. steveire added a comment. This revision is now accepted and ready to land. Thanks for this change! I don't feel strongly about whether a new method or a new parameter is appropriate, so it's a +1 from me already. Giving other AST nodes consistent API about whethe

[PATCH] D96224: [clang-itdy] Simplify virtual near-miss check

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Thanks for the heads-up. I've reverted it now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96224/new/ https://reviews.llvm.org/D96224 ___ cfe-commits mailing list cfe-commits@

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 326922. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 326923. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 326985. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 326986. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 326987. steveire marked 7 inline comments as done. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Toolin

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 3 inline comments as done. steveire added inline comments. Comment at: clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp:22-25 +auto publicAccessor = [](auto... InnerMatcher) { + return cxxMethodDecl(isPublic(), parameterCountIs(0), isConst(), +

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 2 inline comments as done. steveire added inline comments. Comment at: clang/include/clang/Tooling/NodeIntrospection.h:54 +public: + static std::string format(LocationCall *Call) { +std::vector vec; njames93 wrote: > Should this (and potentia

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 326997. steveire marked an inline comment as done. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Toolin

[PATCH] D97639: [clang-tidy][NFC] Use equalsBoundNode matchers to simplify LoopConvertCheck

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire accepted this revision. steveire added a comment. This revision is now accepted and ready to land. Looks like a good simplification! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97639/new/ https://reviews.llvm.org/D97639

[PATCH] D97142: [clang-tidy] Simplify unused RAII check

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 327004. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97142/new/ https://reviews.llvm.org/D97142 Files: clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp clang-too

[PATCH] D97121: [clang-tidy] Add a single fix mode to clang-tidy

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.h:516 + /// applied at a time. + bool isSingleFixMode() const { return Context->isSingleFixMode(); } }; I find the naming of this as "single fix" confusing. Something alon

[PATCH] D96114: [ASTMatchers] Fix parent-child traversal between functions and parms

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire abandoned this revision. steveire added a comment. Clearing this out of my outgoing list. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96114/new/ https://reviews.llvm.org/D96114 ___ cfe-commits

[PATCH] D97713: [ASTMatchers] Add documentation for convenience matchers

2021-03-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D97713 Files: clang/docs/LibASTMa

[PATCH] D97158: [ASTMatchers] Make nullPointerConstant usable at top-level

2021-03-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D97158#2594973 , @njames93 wrote: > Should we make `nullPtrConstant()` a top level mather? I feel like this > change would actually throw users off. This would make this matcher a "convenience" matcher. https://reviews.llvm.

[PATCH] D97156: [ASTMatchers] Make Param functors variadic

2021-03-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 327559. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97156/new/ https://reviews.llvm.org/D97156 Files: clang/docs/tools/dump_ast_matchers.py clang/include/clang/ASTMatche

[PATCH] D97156: [ASTMatchers] Make Param functors variadic

2021-03-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D97156#2593209 , @njames93 wrote: > Is it not nicer to name the class `PolymorphicMatcher` and do away with > `WithParamN`, It may require partial specialization for the empty parameters > case. > But I think it would be wort

[PATCH] D97142: [clang-tidy] Simplify unused RAII check

2021-03-02 Thread Stephen Kelly 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 rG7b6fc9a1055a: [clang-tidy] Simplify unused RAII check (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D97142?vs=3270

[PATCH] D97156: [ASTMatchers] Make Param functors variadic

2021-03-03 Thread Stephen Kelly 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 rG243cd0afadc7: [ASTMatchers] Make Param functors variadic (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D98296: Simplify readability checks to not need ignoring* matchers

2021-03-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D98296 Files: clang-tools-extra/c

<    3   4   5   6   7   8   9   10   11   >