aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-10-17 18:12:53 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-10-17 18:12:53 +0000
commit8fff5f7bed9fce3f168e061798c63b9ec17fda6a (patch)
treec15bec9b9e909407e8e9d923016321fe291d7c32 /lib/Analysis/CFRefCount.cpp
parent3c2292eb8d6fa6061b00b5b2daac6821b6243a70 (diff)
Simplify more.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84342 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp14
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)