[-Wunreachable-code] generalize configuration value checking to all comparison operators.

llvm-svn: 203016
This commit is contained in:
Ted Kremenek
2014-03-05 22:32:39 +00:00
parent 6a56b21729
commit 3cdbc39a6e
2 changed files with 9 additions and 1 deletions

View File

@@ -382,7 +382,7 @@ static bool isConfigurationValue(const Stmt *S) {
return true;
case Stmt::BinaryOperatorClass: {
const BinaryOperator *B = cast<BinaryOperator>(S);
return (B->isLogicalOp() || B->isRelationalOp()) &&
return (B->isLogicalOp() || B->isComparisonOp()) &&
(isConfigurationValue(B->getLHS()) ||
isConfigurationValue(B->getRHS()));
}