[cfe-dev] Modifying Structs
Anil Altinay via cfe-dev
cfe-dev at lists.llvm.org
Fri Jan 13 13:47:57 PST 2017
Actually, HandleTagDeclDefinition is called for Integer struct but I
couldn't get the name of the struct which is "Integer" from TagDecl. Is
there any way to do this in HandleTagDeclDefinition function.
On Fri, Jan 13, 2017 at 12:22 AM, Anil Altinay <aaltinay at uci.edu> wrote:
> Hello,
>
> I am writing an AST consumer to modify fields of the structs in a C
> program and let clang to generate code accordingly. I was modifying
> structs in HandleTagDeclDefinition(TagDecl *D) but I realized that if a
> struct defined using typedef like below, HandleTagDeclDefinition is not
> called after it's definition is completed. Is there any way to solve this
> problem? Thank you.
>
> typedef struct
> {
> int a;
> } Integer;
>
> best,
> Anil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170113/29c79a2a/attachment.html>
More information about the cfe-dev
mailing list