diff options
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 7 |
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()) { |