From: Ben Langmuir Date: Mon, 26 Jan 2015 20:01:17 +0000 (+0000) Subject: Tweak r227115 per review feedback X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6a07d27d036f80189b7101ab5dba10a916273d8;p=clang Tweak r227115 per review feedback Use getAsArrayTypeUnsafe() instead of getUnqualifiedDesugaredType() to get the underlying ArrayType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227129 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index e354869484..c9d8e5312a 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -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(Str->getType()->getUnqualifiedDesugaredType()); + cast(Str->getType()->getAsArrayTypeUnsafe()); uint64_t StrLength = ConstantArrayTy->getSize().getZExtValue(); if (const IncompleteArrayType *IAT = dyn_cast(AT)) {