diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-12-17 16:48:01 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-12-17 16:48:01 +0000 |
commit | 510ffaefd48b0784367693e823768ac49e288781 (patch) | |
tree | 507eca37368b6f8cd7136af1f60ff057d0fe01b6 | |
parent | 270b4146ad54784ce41d0374e6a894eaab6c1650 (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61140 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 29605b6485..7be76bba1a 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -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); } } |