Untangle getUnderlyingDeclImpl, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152339 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index f2ac5c1..2f42607 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -985,15 +985,13 @@
 
 NamedDecl *NamedDecl::getUnderlyingDeclImpl() {
   NamedDecl *ND = this;
-  while (true) {
-    if (UsingShadowDecl *UD = dyn_cast<UsingShadowDecl>(ND))
-      ND = UD->getTargetDecl();
-    else if (ObjCCompatibleAliasDecl *AD
-              = dyn_cast<ObjCCompatibleAliasDecl>(ND))
-      return AD->getClassInterface();
-    else
-      return ND;
-  }
+  while (UsingShadowDecl *UD = dyn_cast<UsingShadowDecl>(ND))
+    ND = UD->getTargetDecl();
+
+  if (ObjCCompatibleAliasDecl *AD = dyn_cast<ObjCCompatibleAliasDecl>(ND))
+    return AD->getClassInterface();
+
+  return ND;
 }
 
 bool NamedDecl::isCXXInstanceMember() const {