]> granicus.if.org Git - clang/commitdiff
Don't add the injected class name to the redeclarations chain; the chain should conta...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 14 Oct 2010 20:14:21 +0000 (20:14 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 14 Oct 2010 20:14:21 +0000 (20:14 +0000)
As a bonus, now we don't deserialize it unless we need it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116504 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDecl.cpp

index 6f0a7da45059bcb6ded6bb24346df0c34c299445..93909f995d446aad4f2ccf7856f553aa6646cb3b 100644 (file)
@@ -6056,7 +6056,9 @@ void Sema::ActOnStartCXXMemberDeclarations(Scope *S, Decl *TagD,
                             CurContext, Record->getLocation(),
                             Record->getIdentifier(),
                             Record->getTagKeywordLoc(),
-                            Record);
+                            /*PrevDecl=*/0,
+                            /*DelayTypeCreation=*/true);
+  Context.getTypeDeclType(InjectedClassName, Record);
   InjectedClassName->setImplicit();
   InjectedClassName->setAccess(AS_public);
   if (ClassTemplateDecl *Template = Record->getDescribedClassTemplate())