Fix type compatibility between constant and variable arrays.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47003 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/ASTContext.cpp b/AST/ASTContext.cpp
index 6eae458..dd8a9d4 100644
--- a/AST/ASTContext.cpp
+++ b/AST/ASTContext.cpp
@@ -1685,6 +1685,10 @@
// comparisons, just force one to the other.
if (LHSClass == Type::FunctionProto) LHSClass = Type::FunctionNoProto;
if (RHSClass == Type::FunctionProto) RHSClass = Type::FunctionNoProto;
+
+ // Same as above for arrays
+ if (LHSClass == Type::VariableArray) LHSClass = Type::ConstantArray;
+ if (RHSClass == Type::VariableArray) RHSClass = Type::ConstantArray;
// If the canonical type classes don't match...
if (LHSClass != RHSClass) {