summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-12-17 16:48:01 +0000
committerDouglas Gregor <dgregor@apple.com>2008-12-17 16:48:01 +0000
commit664fda14d36649fb61d07077fdbf763d3f06c8fa (patch)
treed5ad3a53247e1b50c4edadc0e803bffd9eedefa5
parent816dba163ed8985410d8bf2a4e684f4603984d38 (diff)
downloadbcm5719-llvm-664fda14d36649fb61d07077fdbf763d3f06c8fa.tar.gz
bcm5719-llvm-664fda14d36649fb61d07077fdbf763d3f06c8fa.zip
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
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 29605b6485f..7be76bba1a0 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/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);
}
}
OpenPOWER on IntegriCloud