diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-08-25 22:26:53 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-08-25 22:26:53 +0000 |
commit | ca4c40ab4995d195d9a4d175fa7c30dcc2d99ebf (patch) | |
tree | 7122af21c2a6fcea95374fbbe5fbc1e5ca64095e /lib | |
parent | 6f155de99c59af890817146ec8526bafb6560f1f (diff) |
objc - fix a bug exposed by my recent decl context
changes. // rdar://10015110
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138594 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 7a9d6d5072..03081bec13 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -540,6 +540,9 @@ Sema::ActOnStartProtocolInterface(SourceLocation AtProtoInterfaceLoc, // Make sure the cached decl gets a valid start location. PDecl->setLocation(AtProtoInterfaceLoc); PDecl->setForwardDecl(false); + // Since this ObjCProtocolDecl was created by a forward declaration, + // we now add it to the DeclContext since it wasn't added before + PDecl->setLexicalDeclContext(CurContext); CurContext->addDecl(PDecl); // Repeat in dependent AST files. PDecl->setChangedSinceDeserialization(true); |