diff options
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
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<TypedefType>(RetTy.getTypePtr())) { - llvm::StringRef TDName = TD->getDecl()->getIdentifier()->getNameStr(); - if (TDName.startswith(prefix) && TDName.endswith("Ref")) - return true; + while (TypedefType* TD = dyn_cast<TypedefType>(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) |