]> granicus.if.org Git - clang/commitdiff
fix a bug I introduced in r107624
authorChris Lattner <sabre@nondot.org>
Mon, 5 Jul 2010 19:36:34 +0000 (19:36 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 5 Jul 2010 19:36:34 +0000 (19:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107626 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp

index 3236183345be713d443a95a6a8e3a21fdddc8a94..bfcf25fb94203a95927b49df8da8b591d4c440f1 100644 (file)
@@ -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()) {