aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2008-05-13 20:16:47 +0000
committerEli Friedman <eli.friedman@gmail.com>2008-05-13 20:16:47 +0000
commit5773a6c4ab5a3a7aa9f089bfde3ca1c99ea674ac (patch)
tree74d348006198e1fd9e0559d667282f15bc99a53c /lib/Sema/SemaExpr.cpp
parent73cb10307bfc597f8b326e1c276648f6770de574 (diff)
Both operands to && have to be scalars, not just one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51065 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 68a3f8d593..4567d82719 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -1603,7 +1603,7 @@ inline QualType Sema::CheckLogicalOperands( // C99 6.5.[13,14]
UsualUnaryConversions(lex);
UsualUnaryConversions(rex);
- if (lex->getType()->isScalarType() || rex->getType()->isScalarType())
+ if (lex->getType()->isScalarType() && rex->getType()->isScalarType())
return Context.IntTy;
return InvalidOperands(loc, lex, rex);
}