Do not crash when performing VisitLValue on union types.
This fixes PR 2948.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58148 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 7d60dec..2a74311 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -457,9 +457,10 @@
       // can be used in a lvalue context.  We need to enhance our support
       // of such temporaries in both the environment and the store, so right
       // now we just do a regular visit.
-      assert (Ex->getType()->isAggregateType() && 
-              "Other kinds of expressions with non-aggregate types do not "
-              "have lvalues.");
+      assert ((Ex->getType()->isAggregateType() || 
+              Ex->getType()->isUnionType()) &&
+              "Other kinds of expressions with non-aggregate/union types do"
+              " not have lvalues.");
       
       Visit(Ex, Pred, Dst);
   }