From: Daniel Dunbar Date: Sat, 17 Oct 2009 18:12:53 +0000 (+0000) Subject: Simplify more. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8fff5f7bed9fce3f168e061798c63b9ec17fda6a;p=clang Simplify more. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84342 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 5eac3fdc5d..7379b67d59 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -212,16 +212,12 @@ static bool isRefType(QualType RetTy, const char* prefix, ASTContext* Ctx = 0, const char* name = 0) { // Recursively walk the typedef stack, allowing typedefs of reference types. - while (1) { - if (TypedefType* TD = dyn_cast(RetTy.getTypePtr())) { - llvm::StringRef TDName = TD->getDecl()->getIdentifier()->getNameStr(); - if (TDName.startswith(prefix) && TDName.endswith("Ref")) - return true; + while (TypedefType* TD = dyn_cast(RetTy.getTypePtr())) { + llvm::StringRef TDName = TD->getDecl()->getIdentifier()->getNameStr(); + if (TDName.startswith(prefix) && TDName.endswith("Ref")) + return true; - RetTy = TD->getDecl()->getUnderlyingType(); - continue; - } - break; + RetTy = TD->getDecl()->getUnderlyingType(); } if (!Ctx || !name)