[cfe-commits] r64542 - /cfe/trunk/lib/Sema/SemaExpr.cpp

Chris Lattner sabre at nondot.org
Fri Feb 13 23:22:29 PST 2009


Author: lattner
Date: Sat Feb 14 01:22:29 2009
New Revision: 64542

URL: http://llvm.org/viewvc/llvm-project?rev=64542&view=rev
Log:
reduce nesting.

Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=64542&r1=64541&r2=64542&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sat Feb 14 01:22:29 2009
@@ -1897,21 +1897,18 @@
                cast<UnaryOperator>(FnExpr)->getOpcode() 
                  == UnaryOperator::AddrOf) {
       FnExpr = cast<UnaryOperator>(FnExpr)->getSubExpr();
+    } else if ((DRExpr = dyn_cast<DeclRefExpr>(FnExpr))) {
+      // Qualified names disable ADL (C++0x [basic.lookup.argdep]p1).
+      ADL &= !isa<QualifiedDeclRefExpr>(DRExpr);
+      break;
+    } else if (UnresolvedFunctionNameExpr *DepName 
+                 = dyn_cast<UnresolvedFunctionNameExpr>(FnExpr)) {
+      UnqualifiedName = DepName->getName();
+      break;
     } else {
-      if (isa<DeclRefExpr>(FnExpr)) {
-        DRExpr = cast<DeclRefExpr>(FnExpr);
-
-        // Qualified names disable ADL (C++0x [basic.lookup.argdep]p1).
-        ADL = ADL && !isa<QualifiedDeclRefExpr>(DRExpr);
-      }
-      else if (UnresolvedFunctionNameExpr *DepName 
-                 = dyn_cast<UnresolvedFunctionNameExpr>(FnExpr))
-        UnqualifiedName = DepName->getName();
-      else {
-        // Any kind of name that does not refer to a declaration (or
-        // set of declarations) disables ADL (C++0x [basic.lookup.argdep]p3).
-        ADL = false;
-      }
+      // Any kind of name that does not refer to a declaration (or
+      // set of declarations) disables ADL (C++0x [basic.lookup.argdep]p3).
+      ADL = false;
       break;
     }
   }





More information about the cfe-commits mailing list