[cfe-commits] r39558 - /cfe/cfe/trunk/Sema/SemaExpr.cpp
clattner at cs.uiuc.edu
clattner at cs.uiuc.edu
Wed Jul 11 09:45:35 PDT 2007
Author: clattner
Date: Wed Jul 11 11:45:35 2007
New Revision: 39558
URL: http://llvm.org/viewvc/llvm-project?rev=39558&view=rev
Log:
Correct the type of logical not.
Modified:
cfe/cfe/trunk/Sema/SemaExpr.cpp
Modified: cfe/cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Sema/SemaExpr.cpp?rev=39558&r1=39557&r2=39558&view=diff
==============================================================================
--- cfe/cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/cfe/trunk/Sema/SemaExpr.cpp Wed Jul 11 11:45:35 2007
@@ -1229,6 +1229,8 @@
if (!resultType->isScalarType()) // C99 6.5.3.3p1
return Diag(OpLoc, diag::err_typecheck_unary_expr,
resultType.getAsString());
+ // LNot always has type int. C99 6.5.3.3p5.
+ resultType = Context.IntTy;
break;
case UnaryOperator::SizeOf:
resultType = CheckSizeOfAlignOfOperand(((Expr *)Input)->getType(), OpLoc,
More information about the cfe-commits
mailing list