Since AnnotationAttr can add extra arguments
now, update Attribute plugin example to fit this API
to make this example compiled.
Details
Details
- Reviewers
john.brawn aaron.ballman Tyker erichkeane
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
clang/examples/Attribute/Attribute.cpp | ||
---|---|---|
59 | AnnotationAttr is used as an extra information in attribute plugin designs. Usually after handling the customized attribute, coders will add an AnnotationAttr into the AST, for later use. Before the new API released, create an AnnotationAttr is not very hard. But now AnnotationAttr accepts a StringLiteralExpr as it's first argument, in order to do the same thing I mentioned above, we have to create an StringLiteralExpr from nowhere, which looks not very elegant to me. |
Comment Actions
I recently made it much easier to create AnnotationAttr in this context with https://reviews.llvm.org/rGd093401a2617d3c46aaed9eeaecf877e3ae1a9f1.
AnnotationAttr is used as an extra information in attribute plugin designs. Usually after handling the customized attribute, coders will add an AnnotationAttr into the AST, for later use.
Before the new API released, create an AnnotationAttr is not very hard.
But now AnnotationAttr accepts a StringLiteralExpr as it's first argument, in order to do the same thing I mentioned above, we have to create an StringLiteralExpr from nowhere, which looks not very elegant to me.