From 470c454a6176ef31474553e408c90f5ee630df89 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Thu, 14 Oct 2010 20:14:21 +0000 Subject: Don't add the injected class name to the redeclarations chain; the chain should contain actual redeclarations, not implicits. As a bonus, now we don't deserialize it unless we need it. llvm-svn: 116504 --- clang/lib/Sema/SemaDecl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaDecl.cpp') diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 6f0a7da4505..93909f995d4 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -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()) -- cgit v1.2.3