[cfe-dev] EnumConstantDecl is added to EnumDecl twice

Zhongxing Xu xuzhongxing at gmail.com
Wed Jan 7 19:26:32 PST 2009


Hi,

Currently every EnumConstantDecl is added to its EnumDecl twice: one at
SemaDecl.cpp:3489, the other at SemaDecl.cpp:109.

I noticed the comments said that the enumerator is stored in two
DeclContexts. Maybe we should change line SemaDecl.cpp:109 :

CurContext->addDecl(Context, SD);

into:

((DeclContext *)S->getEntity())->addDecl(Context, SD);

to make it conform to the comments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090108/9c186eeb/attachment.html>


More information about the cfe-dev mailing list