[PATCH] D91047: Add a call super attribute plugin example

2020-11-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In D91047#2407091 , @psionic12 wrote: > @aaron.ballman That would be nice if your could help, and `Yafei Liu > ` is okay. Thank you for the new example, I've commit on your behalf in 2ce

[PATCH] D91047: Add a call super attribute plugin example

2020-11-19 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 added a comment. @aaron.ballman That would be nice if your could help, and `Yafei Liu ` is okay. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91047/new/ https://reviews.llvm.org/D91047 ___ cf

[PATCH] D91047: Add a call super attribute plugin example

2020-11-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you for the new plugin example! Do you need me to commit on your behalf? If so, are you okay with `Yafei Liu ` for attribution? Repository: rG LLVM Github Monorep

[PATCH] D91047: Add a call super attribute plugin example

2020-11-18 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 updated this revision to Diff 306283. psionic12 added a comment. Simplify the test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91047/new/ https://reviews.llvm.org/D91047 Files: clang/examples/CMakeLists.txt clang/examples/Call

[PATCH] D91047: Add a call super attribute plugin example

2020-11-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ClangPlugins.rst:116 +Defining CallSuperAttr +== psionic12 wrote: > After a whole day's research of `Sphinx`, I figured out that > `ClangPlugins.rst` is the "proto-type" of > htt

[PATCH] D91047: Add a call super attribute plugin example

2020-11-17 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 marked an inline comment as done. psionic12 added inline comments. Comment at: clang/test/Frontend/plugin-call-super.cpp:18-19 +struct Derive2 : public Base1, public Base2 { void Test() override { Base1::Test(); Base2::Test();}}; +// BADCALLSUPER: warning: virtual fu

[PATCH] D91047: Add a call super attribute plugin example

2020-11-17 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 added inline comments. Comment at: clang/docs/ClangPlugins.rst:116 +Defining CallSuperAttr +== After a whole day's research of `Sphinx`, I figured out that `ClangPlugins.rst` is the "proto-type" of https://clang.llvm.org/docs/Cl

[PATCH] D91047: Add a call super attribute plugin example

2020-11-17 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 updated this revision to Diff 305725. psionic12 added a comment. use `VerifyDiagnosticConsumer` (-verify) instead of `FileCheck` for syntax only feature test. remove illustration in ClangPlugins.rst (which is not very appropriate) Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D91047: Add a call super attribute plugin example

2020-11-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ClangPlugins.rst:117 +Defining CallSuperAttr +=== + psionic12 wrote: > aaron.ballman wrote: > > psionic12 wrote: > > > aaron.ballman wrote: > > > > aaron.ballman wrote: > > > > > The numb

[PATCH] D91047: Add a call super attribute plugin example

2020-11-15 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 marked 6 inline comments as done. psionic12 added inline comments. Comment at: clang/docs/ClangPlugins.rst:117 +Defining CallSuperAttr +=== + aaron.ballman wrote: > psionic12 wrote: > > aaron.ballman wrote: > > > aaron.ballman wrote: > >

[PATCH] D91047: Add a call super attribute plugin example

2020-11-15 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 updated this revision to Diff 305405. psionic12 added a comment. Fix the grammar Simplify the code logic Simplify the test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91047/new/ https://reviews.llvm.org/D91047 Files: clang/docs/

[PATCH] D91047: Add a call super attribute plugin example

2020-11-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ClangPlugins.rst:117 +Defining CallSuperAttr +=== + psionic12 wrote: > aaron.ballman wrote: > > aaron.ballman wrote: > > > The number of underlines here looks off -- can you verify it's c

[PATCH] D91047: Add a call super attribute plugin example

2020-11-12 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 added a comment. I just enabled `LLVM_ENABLE_DOXYGEN` `LLVM_BUILD_DOCS`, and use `make doxygen-clang`, it seems no error with my newest patch, is this > This still appears to be incorrect and will cause build errors for the > documentation. use the same way? Repository: rG LLVM G

[PATCH] D91047: Add a call super attribute plugin example

2020-11-12 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 marked 5 inline comments as done. psionic12 added inline comments. Comment at: clang/docs/ClangPlugins.rst:117 +Defining CallSuperAttr +=== + aaron.ballman wrote: > aaron.ballman wrote: > > The number of underlines here looks off -- can

[PATCH] D91047: Add a call super attribute plugin example

2020-11-12 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 updated this revision to Diff 305011. psionic12 marked an inline comment as done. psionic12 added a comment. fix grammer errors in warning messages and documents Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91047/new/ https://reviews.llv

[PATCH] D91047: Add a call super attribute plugin example

2020-11-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I have more review to do on this but have to run for a while and wanted to get you this feedback sooner rather than later. Comment at: clang/docs/ClangPlugins.rst:119 + +Attribute plugin to mark a virtual method as `call_super`, subclasses must

[PATCH] D91047: Add a call super attribute plugin example

2020-11-10 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 added inline comments. Comment at: clang/examples/CallSuperAttribute/CallSuperAttrInfo.cpp:133 + PluginASTAction::ActionType getActionType() override { +return AddBeforeMainAction; + } `AddAfterMainAction` will get run after IR codes were generate

[PATCH] D91047: Add a call super attribute plugin example

2020-11-10 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 updated this revision to Diff 304129. psionic12 added a comment. Add more detail in ClangPlugins.rst. Re-design overridden usage checking. Fix some code style issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91047/new/ https://review

[PATCH] D91047: Add a call super attribute plugin example

2020-11-10 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 added inline comments. Comment at: clang/docs/ClangPlugins.rst:119 + +Attribute plugin to mark a virtual method as call_super, sub-classes must call it in overridden the method. + psionic12 wrote: > aaron.ballman wrote: > > aaron.ballman wrote: > > > S

[PATCH] D91047: Add a call super attribute plugin example

2020-11-09 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 added inline comments. Comment at: clang/docs/ClangPlugins.rst:119 + +Attribute plugin to mark a virtual method as call_super, sub-classes must call it in overridden the method. + aaron.ballman wrote: > aaron.ballman wrote: > > Should add backticks aro

[PATCH] D91047: Add a call super attribute plugin example

2020-11-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ClangPlugins.rst:117 +Defining CallSuperAttr +=== + The number of underlines here looks off -- can you verify it's correct? Comment at: clang/docs/ClangPlugins.rst:119

[PATCH] D91047: Add a call super attribute plugin example

2020-11-09 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 added inline comments. Comment at: clang/test/Frontend/plugin-call-super.cpp:7 +struct Base2 { [[call_super]] virtual void Test() {} }; +struct Derive : public Base1, public Base2 { [[call_super]] virtual void Test() override final; }; +// CALLSUPER: warning: call_supe

[PATCH] D91047: Add a call super attribute plugin example

2020-11-09 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 updated this revision to Diff 303772. psionic12 added a comment. add final attribute checking Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91047/new/ https://reviews.llvm.org/D91047 Files: clang/docs/ClangPlugins.rst clang/examples/

[PATCH] D91047: Add a call super attribute plugin example

2020-11-08 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 created this revision. psionic12 added a reviewer: aaron.ballman. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. psionic12 requested review of this revision. If a virtual method is marked as call_super, the override method must call it, simpler feature like