aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-07-05 19:36:34 +0000
committerChris Lattner <sabre@nondot.org>2010-07-05 19:36:34 +0000
commitc721ae85bac9bccd8494d43c1c1ec596030ffbd0 (patch)
tree9784db9803e7d17ed5fd55ced2bd6cbfd3673ad1
parentfd79a9d403943c01fd6650878a86b96a9378beaf (diff)
fix a bug I introduced in r107624
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107626 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaExpr.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 3236183345..bfcf25fb94 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -6080,12 +6080,9 @@ QualType Sema::CheckAddressOfOperand(Expr *op, SourceLocation OpLoc) {
<< op->getType() << op->getSourceRange();
if (isSFINAEContext())
return QualType();
- }
-
- if (isa<ObjCSelectorExpr>(op))
+ } else if (isa<ObjCSelectorExpr>(op))
return Context.getPointerType(op->getType());
-
- if (lval != Expr::LV_Valid && lval != Expr::LV_IncompleteVoidType) {
+ else if (lval != Expr::LV_Valid && lval != Expr::LV_IncompleteVoidType) {
// C99 6.5.3.2p1
// The operand must be either an l-value or a function designator
if (!op->getType()->isFunctionType()) {