diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-01-12 18:45:55 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-01-12 18:45:55 +0000 |
commit | 45a33ecce1fc8888834d88c3b16f6d86b40ade78 (patch) | |
tree | 8dbed4bca3d226376abbe64f42295e5e82b67c87 /clang/lib/Parse/ParseObjc.cpp | |
parent | 5daa1abf256f83c6a27f4b456aa42daf1954dba2 (diff) | |
download | bcm5719-llvm-45a33ecce1fc8888834d88c3b16f6d86b40ade78.tar.gz bcm5719-llvm-45a33ecce1fc8888834d88c3b16f6d86b40ade78.zip |
Properly set the scope of non-fields declared within a struct, union,
or enum to be outside that struct, union, or enum. Fixes several
regressions:
<rdar://problem/6487662>
<rdar://problem/6487669>
<rdar://problem/6487684>
<rdar://problem/6487702>
PR clang/3305
PR clang/3312
There is still some work to do in Objective-C++, but this requires
that each of the Objective-C entities (interfaces, implementations,
etc.) to be introduced into the context stack with
PushDeclContext/PopDeclContext. This will be a separate fix, later.
llvm-svn: 62091
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r-- | clang/lib/Parse/ParseObjc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index 90a14949667..f406eabf566 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/lib/Parse/ParseObjc.cpp @@ -848,7 +848,7 @@ void Parser::ParseObjCClassInstanceVariables(DeclTy *interfaceDecl, llvm::SmallVector<DeclTy*, 32> AllIvarDecls; llvm::SmallVector<FieldDeclarator, 8> FieldDeclarators; - ParseScope ClassScope(this, Scope::DeclScope); + ParseScope ClassScope(this, Scope::DeclScope|Scope::ClassScope); SourceLocation LBraceLoc = ConsumeBrace(); // the "{" |