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 | f3e5b4eb8062c35af7e715494760863dc57e0035 (patch) | |
| tree | e59ca66436807eee71a93fc09a09972302984e76 /clang/lib/AST/Decl.cpp | |
| parent | f830e481c26245baba836fb379f54bafe530f974 (diff) | |
| download | bcm5719-llvm-f3e5b4eb8062c35af7e715494760863dc57e0035.tar.gz bcm5719-llvm-f3e5b4eb8062c35af7e715494760863dc57e0035.zip | |
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.
llvm-svn: 122387
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
| -rw-r--r-- | clang/lib/AST/Decl.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 7a35c748737..08272e76ca4 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/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?"); |

