diff options
author | Francois Pichet <pichet2000@gmail.com> | 2010-12-22 03:46:10 +0000 |
---|---|---|
committer | Francois Pichet <pichet2000@gmail.com> | 2010-12-22 03:46:10 +0000 |
commit | a0e27f00158c9306d53b0003b94182e415380ea9 (patch) | |
tree | 9bc522024dee01224ec7910da165811b31f02ab2 /lib/AST/Decl.cpp | |
parent | f97ecf3566cd006875c8f76e426126b4b5a551f7 (diff) |
Redesign the way anonymous fields are handled in designated-initializers.
Previously designated anonymous fields were found via name lookup. This redesign uses the fact that an IndirectFieldDecl declaration will always follow an anonymous implicit field to remove the special case of name lookup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122387 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 7a35c74873..08272e76ca 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -2005,17 +2005,6 @@ void RecordDecl::completeDefinition() { TagDecl::completeDefinition(); } -ValueDecl *RecordDecl::getAnonymousStructOrUnionObject() { - // Force the decl chain to come into existence properly. - if (!getNextDeclInContext()) getParent()->decls_begin(); - - assert(isAnonymousStructOrUnion()); - ValueDecl *D = cast<ValueDecl>(getNextDeclInContext()); - assert(D->getType()->isRecordType()); - assert(D->getType()->getAs<RecordType>()->getDecl() == this); - return D; -} - void RecordDecl::LoadFieldsFromExternalStorage() const { ExternalASTSource *Source = getASTContext().getExternalSource(); assert(hasExternalLexicalStorage() && Source && "No external storage?"); |