diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-11-18 23:15:37 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-11-18 23:15:37 +0000 |
commit | 1e3609f6c48d4908773478c7e7b99ec3026886eb (patch) | |
tree | 71a38dbf134b740a1accda3edef25f469739462c /clang | |
parent | 6a96bf7d6e33d18d0599210941f893e3de3612fe (diff) | |
download | bcm5719-llvm-1e3609f6c48d4908773478c7e7b99ec3026886eb.tar.gz bcm5719-llvm-1e3609f6c48d4908773478c7e7b99ec3026886eb.zip |
Do not enter forward class 'Protocol' in decl context.
Will do it later. Fixes pr5552.
llvm-svn: 89269
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/Sema/Sema.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaObjC/class-protocol.m | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index b2bbac8bc2a..fe2d7448b42 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -319,7 +319,7 @@ void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) { &Context.Idents.get("Protocol"), SourceLocation(), true); Context.setObjCProtoType(Context.getObjCInterfaceType(ProtocolDecl)); - PushOnScopeChains(ProtocolDecl, TUScope); + PushOnScopeChains(ProtocolDecl, TUScope, false); } // Create the built-in typedef for 'id'. if (Context.getObjCIdType().isNull()) { diff --git a/clang/test/SemaObjC/class-protocol.m b/clang/test/SemaObjC/class-protocol.m new file mode 100644 index 00000000000..12b63817513 --- /dev/null +++ b/clang/test/SemaObjC/class-protocol.m @@ -0,0 +1,6 @@ +// RUN: clang-cc -fsyntax-only -verify %s +// pr5552 + +@interface Protocol +@end + |