aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Sema/Sema.cpp2
-rw-r--r--test/SemaObjC/class-protocol.m6
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index b2bbac8bc2..fe2d7448b4 100644
--- a/lib/Sema/Sema.cpp
+++ b/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/test/SemaObjC/class-protocol.m b/test/SemaObjC/class-protocol.m
new file mode 100644
index 0000000000..12b6381751
--- /dev/null
+++ b/test/SemaObjC/class-protocol.m
@@ -0,0 +1,6 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+// pr5552
+
+@interface Protocol
+@end
+