Просмотр исходного кода

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 лет назад
Родитель
Сommit
4d78de18c1
1 измененных файлов с 2 добавлено и 2 удалено
  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()) {
     } else if (Options.IsOutermostType()) {
       QualType P = PointeeTy;
       QualType P = PointeeTy;
-      while (P->getAs<PointerType>())
-        P = P->getAs<PointerType>()->getPointeeType();
+      while (auto PT = P->getAs<PointerType>())
+        P = PT->getPointeeType();
       if (P.isConstQualified()) {
       if (P.isConstQualified()) {
         isReadOnly = true;
         isReadOnly = true;
         S += 'r';
         S += 'r';