Teach Expr::isConstantExpr() about CompoundLiterals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45764 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/Expr.cpp b/AST/Expr.cpp
index 236c783..726e493 100644
--- a/AST/Expr.cpp
+++ b/AST/Expr.cpp
@@ -469,6 +469,10 @@
       return TR->isArrayType();
     return false;
   }
+  case CompoundLiteralExprClass:
+    if (Loc) *Loc = getLocStart();
+    // Allow "(int []){2,4}", since the array will be converted to a pointer.
+    return TR->isArrayType();
   case UnaryOperatorClass: {
     const UnaryOperator *Exp = cast<UnaryOperator>(this);