[cfe-dev] Get EnumDecl from Sema

Reid Kleckner rnk at google.com
Tue Apr 28 13:17:23 PDT 2015


You can use Sema::LookupName to do arbitrary name lookup. If you know the
expression references the enum, you might be able to navigate the AST to
find it that way.

On Tue, Apr 28, 2015 at 10:00 AM, Daniel Dilts <diltsman at gmail.com> wrote:

> I would like to get an EnumDecl in Sema::ActOnIdExpression.  I know the
> name of the enumeration type.  How would I go about finding it?  I assume
> it is somewhere in the ASTContext, but I can't find it.
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150428/81222a8b/attachment.html>


More information about the cfe-dev mailing list