summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-01-12 18:45:55 +0000
committerDouglas Gregor <dgregor@apple.com>2009-01-12 18:45:55 +0000
commit45a33ecce1fc8888834d88c3b16f6d86b40ade78 (patch)
tree8dbed4bca3d226376abbe64f42295e5e82b67c87 /clang/lib/Parse/ParseObjc.cpp
parent5daa1abf256f83c6a27f4b456aa42daf1954dba2 (diff)
downloadbcm5719-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.cpp2
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 "{"
OpenPOWER on IntegriCloud