Forráskód Böngészése

Remove duplicate P->getAs<PointerType>() call. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373611 91177308-0d34-0410-b5e6-96231b3b80d8
Simon Pilgrim 5 éve
szülő
commit
4d78de18c1
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      lib/AST/ASTContext.cpp

+ 2 - 2
lib/AST/ASTContext.cpp

@@ -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';