From d834f1f63eda24ccf728d4f16c36c97daaabe301 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 3 Oct 2019 15:08:20 +0000 Subject: [PATCH] Remove duplicate P->getAs() call. NFCI. llvm-svn: 373611 --- clang/lib/AST/ASTContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 99fac32..2bde004 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/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()) - P = P->getAs()->getPointeeType(); + while (auto PT = P->getAs()) + P = PT->getPointeeType(); if (P.isConstQualified()) { isReadOnly = true; S += 'r'; -- 2.7.4