As ArrayType::ArrayType mentioned in clang/lib/AST/Type.cpp, a DependentSizedArrayType might not have size expression because it it used as the type of a dependent array of unknown bound with a dependent braced initializer.
Thus, I add a check when mangling array of that type.
This should fix https://bugs.llvm.org/show_bug.cgi?id=49478
I am not sure if this test tests the code you change since the mangled variable name does not encode type.