From a6a07d27d036f80189b7101ab5dba10a916273d8 Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Mon, 26 Jan 2015 20:01:17 +0000 Subject: [PATCH] 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 --- lib/Sema/SemaInit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) { -- 2.50.1