summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-14 07:22:29 +0000
committerChris Lattner <sabre@nondot.org>2009-02-14 07:22:29 +0000
commit3a23073918af9ca6dd9cef5549191455ba60603b (patch)
treee1d19c5140b62f5d0d2af78e46b3f6264f362fee /clang
parentd25fb7a6130c4a395b88d43222156b855313a151 (diff)
downloadbcm5719-llvm-3a23073918af9ca6dd9cef5549191455ba60603b.tar.gz
bcm5719-llvm-3a23073918af9ca6dd9cef5549191455ba60603b.zip
reduce nesting.
llvm-svn: 64542
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index cec771d4e51..ee3ef04084e 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -1897,21 +1897,18 @@ Sema::ActOnCallExpr(Scope *S, ExprArg fn, SourceLocation LParenLoc,
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;
}
}
OpenPOWER on IntegriCloud