[PATCH] D92006: Refactoring the attrubute plugin example to fit the new API

2020-12-10 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. Thanks for the changes, LGTM! Comment at: clang/test/Frontend/plugin-attribute.cpp:1 -// RUN: %clang -fplugin=%llvmshlibdir/Attribute%pluginext -emit-llvm -S

[PATCH] D92006: Refactoring the attrubute plugin example to fit the new API

2020-12-09 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 marked 5 inline comments as done. psionic12 added inline comments. Comment at: clang/test/Frontend/plugin-attribute.cpp:1 -// RUN: %clang -fplugin=%llvmshlibdir/Attribute%pluginext -emit-llvm -S %s -o - 2>&1 | FileCheck %s --check-prefix=ATTRIBUTE -// RUN: not %clang

[PATCH] D92006: Refactoring the attrubute plugin example to fit the new API

2020-12-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Frontend/plugin-attribute.cpp:1 -// RUN: %clang -fplugin=%llvmshlibdir/Attribute%pluginext -emit-llvm -S %s -o - 2>&1 | FileCheck %s --check-prefix=ATTRIBUTE -// RUN: not %clang

[PATCH] D92006: Refactoring the attrubute plugin example to fit the new API

2020-12-08 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 updated this revision to Diff 310401. psionic12 added a comment. Fix grammar Simplify the test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92006/new/ https://reviews.llvm.org/D92006 Files: clang/examples/Attribute/Attribute.cpp

[PATCH] D92006: Refactoring the attrubute plugin example to fit the new API

2020-12-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/examples/Attribute/Attribute.cpp:65 + DiagnosticsEngine::Error, + "'example' attribute only allowed at most three arguments"); + S.Diag(Attr.getLoc(), ID); only allowed -> accepts

[PATCH] D92006: Refactoring the attrubute plugin example to fit the new API

2020-12-07 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 added inline comments. Comment at: clang/examples/Attribute/Attribute.cpp:81 +D->addAttr(AnnotateAttr::Create(S.Context, "example", , +Attr.getNumArgs(), Attr.getRange())); return AttributeApplied; psionic12

[PATCH] D92006: Refactoring the attrubute plugin example to fit the new API

2020-12-07 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 updated this revision to Diff 309853. psionic12 marked 2 inline comments as done. psionic12 added a comment. Use a vector to collect arguments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92006/new/ https://reviews.llvm.org/D92006

[PATCH] D92006: Refactoring the attrubute plugin example to fit the new API

2020-12-07 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 marked 4 inline comments as done. psionic12 added inline comments. Comment at: clang/examples/Attribute/Attribute.cpp:81 +D->addAttr(AnnotateAttr::Create(S.Context, "example", , +Attr.getNumArgs(), Attr.getRange())); return

[PATCH] D92006: Refactoring the attrubute plugin example to fit the new API

2020-12-06 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 updated this revision to Diff 309814. psionic12 marked an inline comment as done. psionic12 added a comment. Fix grammar Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92006/new/ https://reviews.llvm.org/D92006 Files:

[PATCH] D92006: Refactoring the attrubute plugin example to fit the new API

2020-12-06 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 updated this revision to Diff 309813. psionic12 added a comment. Add tests to check if attributes are attached to AST Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92006/new/ https://reviews.llvm.org/D92006 Files:

[PATCH] D92006: Refactoring the attrubute plugin example to fit the new API

2020-12-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/examples/Attribute/Attribute.cpp:26 ExampleAttrInfo() { -// Can take an optional string argument (the check that the argument -// actually is a string happens in handleDeclAttribute). -OptArgs = 1; +// Can

[PATCH] D92006: Refactoring the attrubute plugin example to fit the new API

2020-11-26 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92006/new/ https://reviews.llvm.org/D92006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D92006: Refactoring the attrubute plugin example to fit the new API

2020-11-23 Thread Yafei Liu via Phabricator via cfe-commits
psionic12 created this revision. psionic12 added reviewers: john.brawn, aaron.ballman, Tyker. Herald added a project: clang. Herald added a subscriber: cfe-commits. psionic12 requested review of this revision. Make the example compiled and the test case passed. Repository: rG LLVM Github