[cfe-commits] r89269 - in /cfe/trunk: lib/Sema/Sema.cpp test/SemaObjC/class-protocol.m

Fariborz Jahanian fjahanian at apple.com
Wed Nov 18 15:15:37 PST 2009


Author: fjahanian
Date: Wed Nov 18 17:15:37 2009
New Revision: 89269

URL: http://llvm.org/viewvc/llvm-project?rev=89269&view=rev
Log:
Do not enter forward class 'Protocol' in decl context.
Will do it later. Fixes pr5552.


Added:
    cfe/trunk/test/SemaObjC/class-protocol.m
Modified:
    cfe/trunk/lib/Sema/Sema.cpp

Modified: cfe/trunk/lib/Sema/Sema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.cpp?rev=89269&r1=89268&r2=89269&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/Sema.cpp (original)
+++ cfe/trunk/lib/Sema/Sema.cpp Wed Nov 18 17:15:37 2009
@@ -319,7 +319,7 @@
                                 &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()) {

Added: cfe/trunk/test/SemaObjC/class-protocol.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/class-protocol.m?rev=89269&view=auto

==============================================================================
--- cfe/trunk/test/SemaObjC/class-protocol.m (added)
+++ cfe/trunk/test/SemaObjC/class-protocol.m Wed Nov 18 17:15:37 2009
@@ -0,0 +1,6 @@
+// RUN: clang-cc  -fsyntax-only -verify %s
+// pr5552
+
+ at interface Protocol 
+ at end
+





More information about the cfe-commits mailing list