]> granicus.if.org Git - clang/commitdiff
- Fix commit in Parser.h (patch by Kevin Andre).
authorSteve Naroff <snaroff@apple.com>
Wed, 25 Jul 2007 20:45:33 +0000 (20:45 +0000)
committerSteve Naroff <snaroff@apple.com>
Wed, 25 Jul 2007 20:45:33 +0000 (20:45 +0000)
- 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

Sema/SemaExpr.cpp
include/clang/Parse/Parser.h

index abc3ce3f7a75e954db59caaa15d4b5d676d97cb3..955ac683e38a8abf53e458b2e8160da7dab096f6 100644 (file)
@@ -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,
index e7eb40a46cf636d3a3b33ff5b95f377049e369b0..bdae2e1458c56b0edb0a96291d734982098be1ae 100644 (file)
@@ -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.