[llvm-branch-commits] [llvm-gcc-branch] r102450 - in /llvm-gcc-4.2/branches/Apple/Morbo: ./ gcc/c-typeck.c gcc/cp/typeck.c gcc/objc/objc-act.c

Bill Wendling isanbard at gmail.com
Tue Apr 27 11:51:26 PDT 2010


Author: void
Date: Tue Apr 27 13:51:26 2010
New Revision: 102450

URL: http://llvm.org/viewvc/llvm-project?rev=102450&view=rev
Log:
$ svn merge -c 102433 https://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk
--- Merging r102433 into '.':
U    gcc/objc/objc-act.c
U    gcc/cp/typeck.c
U    gcc/c-typeck.c


Modified:
    llvm-gcc-4.2/branches/Apple/Morbo/   (props changed)
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-typeck.c
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/cp/typeck.c
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/objc-act.c

Propchange: llvm-gcc-4.2/branches/Apple/Morbo/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Apr 27 13:51:26 2010
@@ -1,2 +1,2 @@
 /llvm/trunk:100565
-/llvm-gcc-4.2/trunk:98728,98841,98893,99196,99305,99592-99593,99629,99670,99982,99984-99986,99988,99992-99993,99995,99997-99999,100035,100149,100303,100565,100624-100626,100712,100721,101090-101091,101199,101216,101304,101333,101804,101959,102139,102148
+/llvm-gcc-4.2/trunk:98728,98841,98893,99196,99305,99592-99593,99629,99670,99982,99984-99986,99988,99992-99993,99995,99997-99999,100035,100149,100303,100565,100624-100626,100712,100721,101090-101091,101199,101216,101304,101333,101804,101959,102139,102148,102433

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-typeck.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-typeck.c?rev=102450&r1=102449&r2=102450&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-typeck.c (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-typeck.c Tue Apr 27 13:51:26 2010
@@ -7782,6 +7782,10 @@
 c_finish_block_return_stmt (tree retval)
 {
   tree valtype;
+  /* APPLE LOCAL begin radar 7901648 */
+  if (retval == error_mark_node)
+    return error_mark_node;
+  /* APPLE LOCAL end radar 7901648 */
   /* If this is the first return we've seen in the block, infer the type of
      the block from it. */
   if (cur_block->return_type == NULL_TREE)

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/cp/typeck.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/cp/typeck.c?rev=102450&r1=102449&r2=102450&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/cp/typeck.c (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/cp/typeck.c Tue Apr 27 13:51:26 2010
@@ -7056,6 +7056,11 @@
   /* APPLE LOCAL radar 6185344 */
   if (cur_block && !cur_block->block_has_return_type)
     {
+      /* APPLE LOCAL begin radar 7901648 */
+      if (retval == error_mark_node ||
+          retval && TREE_TYPE(retval) == error_mark_node)
+        return error_mark_node;
+      /* APPLE LOCAL end radar 7901648 */
       /* If this is the first return we've seen in the block, infer the type of
 	 the block from it. */
       if (cur_block->return_type == NULL_TREE)

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/objc-act.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/objc-act.c?rev=102450&r1=102449&r2=102450&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/objc-act.c (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/objc-act.c Tue Apr 27 13:51:26 2010
@@ -14642,9 +14642,16 @@
 	 to an instance variable.  It's better to catch the cases
 	 where this is done unknowingly than to support the above
 	 paradigm.  */
+      /* APPLE LOCAL begin radar 7901648 */
+      if (cur_block) {
+        error ("instance variable %qs accessed in class method",
+	        IDENTIFIER_POINTER (id));
+        return error_mark_node;
+      }
       warning (0, "instance variable %qs accessed in class method",
-	       IDENTIFIER_POINTER (id));
+                  IDENTIFIER_POINTER (id));
       self_decl = convert (objc_instance_type, self_decl); /* cast */
+      /* APPLE LOCAL end radar 7901648 */
     }
 
   /* APPLE LOCAL begin ObjC new abi */





More information about the llvm-branch-commits mailing list