[cfe-dev] How to access an AnnotateAttr inside a CXXRecordDecl?

Marcel Schaible via cfe-dev cfe-dev at lists.llvm.org
Thu Nov 26 15:42:26 PST 2020


Hi,

how can I access an AnnotateAttr inside a CXXRecordDecl?

Example:

CXXRecordDecl 0x327da78 ... struct struct_s definition
|-DefinitionData pass_in_registers aggregate standard_layout 
trivially_copyable pod trivial literal
| |-DefaultConstructor exists trivial needs_implicit
| |-CopyConstructor simple trivial has_const_param needs_implicit 
implicit_has_const_param
| |-MoveConstructor exists simple trivial needs_implicit
| |-CopyAssignment trivial has_const_param needs_implicit 
implicit_has_const_param
| |-MoveAssignment exists simple trivial needs_implicit
| `-Destructor simple irrelevant trivial needs_implicit
|-AnnotateAttr 0x327db98 <line:3:35, col:62> "SOME ANNOTATION"
   ^^^^^^^^^^^^
|-CXXRecordDecl 0x32a0780 <line:6:1, col:19> col:19 implicit struct struct_s
|-FieldDecl 0x32a08e8 <line:8:3, col:25> col:25 i 'uint32_t':'unsigned int'
| |-AnnotateAttr 0x32a0938 <line:4:34, col:60> "SOME ANNOTATION"
| `-FullComment 0x32a0d70 <line:8:45, line:10:56>

...

Thanks

Marcel


More information about the cfe-dev mailing list