r227129 - Tweak r227115 per review feedback

Ben Langmuir blangmuir at apple.com
Mon Jan 26 12:01:17 PST 2015


Author: benlangmuir
Date: Mon Jan 26 14:01:17 2015
New Revision: 227129

URL: http://llvm.org/viewvc/llvm-project?rev=227129&view=rev
Log:
Tweak r227115 per review feedback

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

Modified:
    cfe/trunk/lib/Sema/SemaInit.cpp

Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=227129&r1=227128&r2=227129&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Mon Jan 26 14:01:17 2015
@@ -150,7 +150,7 @@ static void CheckStringInit(Expr *Str, Q
                             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)) {





More information about the cfe-commits mailing list