[cfe-dev] How to match clang::attr::Annotate with specific value?
Yafei Liu via cfe-dev
cfe-dev at lists.llvm.org
Sun Jul 5 01:25:50 PDT 2020
For example I have a struct:
struct [[clang::annotate("example")]] ExampleStruct {
int i;
float f;
double d;
int* ip;
uint32_t ii;
};
Currently I use the matcher like this:
clang::ast_matchers::cxxRecordDecl(clang::ast_matchers::hasDefinition(),
clang::ast_matchers::hasAttr(clang::attr::Annotate)).bind("example_struct");
Can I go further by making the matcher check if the annotate is "example"?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200705/b79de6ed/attachment.html>
More information about the cfe-dev
mailing list