Hi,<br><br>Currently every EnumConstantDecl is added to its EnumDecl twice: one at SemaDecl.cpp:3489, the other at SemaDecl.cpp:109.<br><br>I noticed the comments said that the enumerator is stored in two DeclContexts. Maybe we should change line SemaDecl.cpp:109 :<br>
<br>CurContext->addDecl(Context, SD);<br><br>into:<br><br>((DeclContext *)S->getEntity())->addDecl(Context, SD);<br><br>to make it conform to the comments.<br>