[cfe-commits] r61140 - /cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Douglas Gregor
dgregor at apple.com
Wed Dec 17 08:48:13 PST 2008
Author: dgregor
Date: Wed Dec 17 10:48:01 2008
New Revision: 61140
URL: http://llvm.org/viewvc/llvm-project?rev=61140&view=rev
Log:
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
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=61140&r1=61139&r2=61140&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Wed Dec 17 10:48:01 2008
@@ -408,7 +408,9 @@
// 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);
}
}
More information about the cfe-commits
mailing list