psionic12 added inline comments.
================ Comment at: clang/examples/Attribute/Attribute.cpp:59 + + // First we have to create an `StringLiteralExpr`. + StringRef AnnotationString = "example"; ---------------- `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. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91239/new/ https://reviews.llvm.org/D91239 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits