Implement semantic analysis for transparent unions. This is largely
based on a patch from Anders Johnsen. CodeGen support is incomplete,
in that we do not properly coerce to the first field's type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70419 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index faaeb79..d04394d 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -2355,11 +2355,17 @@
   /// This routine is only used by the following two methods. C99 6.5.16.
   AssignConvertType CheckAssignmentConstraints(QualType lhs, QualType rhs);
   
-  // CheckSingleAssignmentConstraints - Currently used by ActOnCallExpr,
+  // CheckSingleAssignmentConstraints - Currently used by 
   // CheckAssignmentOperands, and ActOnReturnStmt. Prior to type checking, 
   // this routine performs the default function/array converions.
   AssignConvertType CheckSingleAssignmentConstraints(QualType lhs, 
                                                      Expr *&rExpr);
+
+  // \brief If the lhs type is a transparent union, check whether we
+  // can initialize the transparent union with the given expression.
+  AssignConvertType CheckTransparentUnionArgumentConstraints(QualType lhs, 
+                                                             Expr *&rExpr);
+
   // CheckCompoundAssignmentConstraints - Type check without performing any 
   // conversions. For compound assignments, the "Check...Operands" methods 
   // perform the necessary conversions.