aboutsummaryrefslogtreecommitdiff
path: root/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
commit1a0d31a3d7f14ddc6370ba912c778aece6c12cf0 (patch)
tree50d74e3ec8f55a33c99d18b782cb60412444bc08 /lib/Parse/ParseObjc.cpp
parent816dd50947cd4c43814fab0b904afcb7c94f15d4 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62091 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 90a1494966..f406eabf56 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/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 "{"