From: Steve Naroff Date: Wed, 25 Jul 2007 20:45:33 +0000 (+0000) Subject: - Fix commit in Parser.h (patch by Kevin Andre). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82c7e6d8215567935d3d52741ccca9876a8ea461;p=clang - Fix commit in Parser.h (patch by Kevin Andre). - Add comment and minor cleanup to yesterday's fix to ParseCallExpr(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40492 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp index abc3ce3f7a..955ac683e3 100644 --- a/Sema/SemaExpr.cpp +++ b/Sema/SemaExpr.cpp @@ -434,12 +434,10 @@ ParseCallExpr(ExprTy *fn, SourceLocation LParenLoc, QualType lhsType = proto->getArgType(i); QualType rhsType = argExpr->getType(); - // C99 6.7.5.3p7 + // If necessary, apply function/array conversion. C99 6.7.5.3p[7,8]. if (const ArrayType *ary = lhsType->isArrayType()) lhsType = Context.getPointerType(ary->getElementType()); - - // C99 6.7.5.3p8 - if (lhsType->isFunctionType()) + else if (lhsType->isFunctionType()) lhsType = Context.getPointerType(lhsType); AssignmentCheckResult result = CheckSingleAssignmentConstraints(lhsType, diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index e7eb40a46c..bdae2e1458 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -225,7 +225,7 @@ private: } /// SkipUntil - Read tokens until we get to the specified token, then consume - /// it (unless DontConsume is false). Because we cannot guarantee that the + /// it (unless DontConsume is true). Because we cannot guarantee that the /// token will ever occur, this skips to the next token, or to some likely /// good stopping point. If StopAtSemi is true, skipping will stop at a ';' /// character.