Remove duplicate P->getAs<PointerType>() call. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 3 Oct 2019 15:08:20 +0000 (15:08 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 3 Oct 2019 15:08:20 +0000 (15:08 +0000)
llvm-svn: 373611

clang/lib/AST/ASTContext.cpp

index 99fac32..2bde004 100644 (file)
@@ -6851,8 +6851,8 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string &S,
       }
     } else if (Options.IsOutermostType()) {
       QualType P = PointeeTy;
-      while (P->getAs<PointerType>())
-        P = P->getAs<PointerType>()->getPointeeType();
+      while (auto PT = P->getAs<PointerType>())
+        P = PT->getPointeeType();
       if (P.isConstQualified()) {
         isReadOnly = true;
         S += 'r';