Query module LogicalExprCouldBeSimplified

name
Logical expression could be simplified
description
When a logical expression can be easily simplified, there may be an opportunity to improve readability by doing so, or it may indicate that the code contains a typo.
kind
problem
id
cpp/logical-expr-could-be-simplified
problem.severity
warning
tags
maintainability

Imports

cpp

Provides classes and predicates for working with C/C++/ObjC/ObjC++ code.

Predicates

boolLiteralInLogicalOp
booleanLiteral
comparisonOnLiterals
simple

A simple literal (i.e. not a macro expansion, enum constant or template argument).