]> granicus.if.org Git - clang/commitdiff
Make the injected-class-name of a C++ class a separate RecordDecl from the class...
authorDouglas Gregor <dgregor@apple.com>
Wed, 17 Dec 2008 16:48:01 +0000 (16:48 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 17 Dec 2008 16:48:01 +0000 (16:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61140 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclCXX.cpp

index 29605b6485f8a2adfdbf309ebca5a2b4ca09a166..7be76bba1a02b6052d501159069733922f21c229 100644 (file)
@@ -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);
   }
 }