Patch to support transparent_union types on
objective-c methods. Fixes radar 7875968.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101935 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index ce06abe..1feca6d 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -216,6 +216,11 @@
 
     AssignConvertType Result =
       CheckSingleAssignmentConstraints(lhsType, argExpr);
+    if (Result == Incompatible && !getLangOptions().CPlusPlus &&
+        CheckTransparentUnionArgumentConstraints(lhsType, argExpr)
+        == Sema::Compatible)
+      Result = Compatible;
+        
     if (Args[i] != argExpr) // The expression was converted.
       Args[i] = argExpr; // Make sure we store the converted expression.