Tweak r227115 per review feedback

Use getAsArrayTypeUnsafe() instead of getUnqualifiedDesugaredType() to
get the underlying ArrayType.

llvm-svn: 227129
This commit is contained in:
Ben Langmuir 2015-01-26 20:01:17 +00:00
parent ee15ea3560
commit 7b30f53b18
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ static void CheckStringInit(Expr *Str, QualType &DeclT, const ArrayType *AT,
Sema &S) {
// Get the length of the string as parsed.
auto *ConstantArrayTy =
cast<ConstantArrayType>(Str->getType()->getUnqualifiedDesugaredType());
cast<ConstantArrayType>(Str->getType()->getAsArrayTypeUnsafe());
uint64_t StrLength = ConstantArrayTy->getSize().getZExtValue();
if (const IncompleteArrayType *IAT = dyn_cast<IncompleteArrayType>(AT)) {