[cfe-dev] Transform Enum constants in the source to their integral values

Manasij Mukherjee manasij7479 at gmail.com
Wed Aug 6 12:37:20 PDT 2014

I want to transform a source file so that Enum constants are replaced by
their respective integral values.
More specifically, this should work on variable initializations and
function or template default argument values.

I can obtain a VarDecl for functions and variables and a
NonTypeTemplateParmDecl for the templates.
(By using DeclVisitor)

How can I detect if these represent Enum Constants ?
And then get their value, possibly.

I tried implementing VisitEnumConstantDecl, but that doesn't seem to get
called for these cases.

Manasij Mukherjee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140807/105cbbbe/attachment.html>

More information about the cfe-dev mailing list