From: Chris Lattner Date: Mon, 5 Jul 2010 19:36:34 +0000 (+0000) Subject: fix a bug I introduced in r107624 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c721ae85bac9bccd8494d43c1c1ec596030ffbd0;p=clang fix a bug I introduced in r107624 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107626 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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(op)) + } else if (isa(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()) {