diff options
| -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 +  | 

