[cfe-dev] Changing Scope::Entity to a DeclContext?

Ryan Gerleve aikavanak at gmail.com
Sun Nov 7 10:46:54 PST 2010


Hello!
While working on the patch for bug 7256, I noticed that the result of
Scope::getEntity is always used as a DeclContext*. Would it be
reasonable to change the Entity in the Scope class to a DeclContext?
This could include:

1. changing the type of Entity from void* to DeclContext*
2. renaming getEntity() to something like getDeclContext()
3. renaming the Entity member, perhaps to LocalDeclContext.

Many casts could be removed if this chage takes place, and it seems
like it would make the code clearer. I'm still a clang newbie, so I may
be missing something obvious here.

Ryan Gerleve



More information about the cfe-dev mailing list