r373611 - Remove duplicate P->getAs<PointerType>() call. NFCI.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 3 08:08:20 PDT 2019
Author: rksimon
Date: Thu Oct 3 08:08:20 2019
New Revision: 373611
URL: http://llvm.org/viewvc/llvm-project?rev=373611&view=rev
Log:
Remove duplicate P->getAs<PointerType>() call. NFCI.
Modified:
cfe/trunk/lib/AST/ASTContext.cpp
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=373611&r1=373610&r2=373611&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Thu Oct 3 08:08:20 2019
@@ -6851,8 +6851,8 @@ void ASTContext::getObjCEncodingForTypeI
}
} 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';
More information about the cfe-commits
mailing list