[cfe-dev] Get EnumDecl from Sema
Daniel Dilts
diltsman at gmail.com
Wed Apr 29 14:08:28 PDT 2015
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.
On Tue, Apr 28, 2015 at 1:17 PM, Reid Kleckner <rnk at google.com> wrote:
> 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/20150429/0467146b/attachment.html>
More information about the cfe-dev
mailing list