summaryrefslogtreecommitdiffstats
path: root/clang/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
commitacb5a4b57c25659b53a6f553b7fa8590d2043f13 (patch)
tree71b09924f07f19c50ee795263ded0022fea9a7c5 /clang/lib/Analysis/CFRefCount.cpp
parent9d9aa167e6d4346e9748f9562ca07651c62f0d2f (diff)
downloadbcm5719-llvm-acb5a4b57c25659b53a6f553b7fa8590d2043f13.tar.gz
bcm5719-llvm-acb5a4b57c25659b53a6f553b7fa8590d2043f13.zip
Simplify more.
llvm-svn: 84342
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp
index 5eac3fdc5d7..7379b67d59c 100644
--- a/clang/lib/Analysis/CFRefCount.cpp
+++ b/clang/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)
OpenPOWER on IntegriCloud