]> granicus.if.org Git - clang/commitdiff
Simplify more.
authorDaniel Dunbar <daniel@zuster.org>
Sat, 17 Oct 2009 18:12:53 +0000 (18:12 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 17 Oct 2009 18:12:53 +0000 (18:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84342 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CFRefCount.cpp

index 5eac3fdc5d79a7a1604e8b95fe54d98d5491826e..7379b67d59cb3a300ee3f3eac7a040b4b60ef2a7 100644 (file)
@@ -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)