<div dir="ltr">IdentifierInfo's are just uniqued strings that track properties like whether the identifer was every a macro or keyword, etc. The preprocessor has an IdentifierTable and you can do something like 'PP.getIdentifierTable().get("MyEnum")' to get one.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 29, 2015 at 2:08 PM, Daniel Dilts <span dir="ltr"><<a href="mailto:diltsman@gmail.com" target="_blank">diltsman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">How do I create the DeclarationName or DeclarationNameInfo to use Sema::LookupName?  I know the name of the enum type, but I cannot see how to create one of those using a string literal.  I keep running into IdentifierInfo which only has a default constructor.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 28, 2015 at 1:17 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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.</div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Apr 28, 2015 at 10:00 AM, Daniel Dilts <span dir="ltr"><<a href="mailto:diltsman@gmail.com" target="_blank">diltsman@gmail.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><span><div dir="ltr">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.</div>
<br></span>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>