summaryrefslogtreecommitdiffstats
path: root/clang/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
commit58639e584c07452c4d0e0322a9c5389939cb8b2e (patch)
tree139207ef7e91eeca01fc15833898f808f94eb3a0 /clang/lib/Sema/SemaExpr.cpp
parente695ab227cc4cb7f825dbbe8a485f56e748211e1 (diff)
downloadbcm5719-llvm-58639e584c07452c4d0e0322a9c5389939cb8b2e.tar.gz
bcm5719-llvm-58639e584c07452c4d0e0322a9c5389939cb8b2e.zip
Both operands to && have to be scalars, not just one.
llvm-svn: 51065
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 68a3f8d5936..4567d82719f 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud