forked from OSchip/llvm-project
Make the injected-class-name of a C++ class a separate RecordDecl from the class itself, with a different scope. This eliminates some ownership issues, so that the RecordDecl only lives in a single context
llvm-svn: 61140
This commit is contained in:
parent
816dba163e
commit
664fda14d3
|
@ -408,7 +408,9 @@ void Sema::ActOnStartCXXClassDef(Scope *S, DeclTy *D, SourceLocation LBrace) {
|
|||
// class itself; this is known as the injected-class-name. For
|
||||
// purposes of access checking, the injected-class-name is treated
|
||||
// as if it were a public member name.
|
||||
PushOnScopeChains(Dcl, S);
|
||||
PushOnScopeChains(CXXRecordDecl::Create(Context, Dcl->getTagKind(),
|
||||
CurContext, Dcl->getLocation(),
|
||||
Dcl->getIdentifier(), Dcl), S);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue