diff options
Diffstat (limited to 'go/analysis/passes/bools/bools.go')
-rw-r--r-- | go/analysis/passes/bools/bools.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/go/analysis/passes/bools/bools.go b/go/analysis/passes/bools/bools.go index 5ae47d894..0d8b0bf4f 100644 --- a/go/analysis/passes/bools/bools.go +++ b/go/analysis/passes/bools/bools.go @@ -94,8 +94,10 @@ func (op boolOp) commutativeSets(info *types.Info, e *ast.BinaryExpr, seen map[* } // checkRedundant checks for expressions of the form -// e && e -// e || e +// +// e && e +// e || e +// // Exprs must contain only side effect free expressions. func (op boolOp) checkRedundant(pass *analysis.Pass, exprs []ast.Expr) { seen := make(map[string]bool) @@ -110,8 +112,10 @@ func (op boolOp) checkRedundant(pass *analysis.Pass, exprs []ast.Expr) { } // checkSuspect checks for expressions of the form -// x != c1 || x != c2 -// x == c1 && x == c2 +// +// x != c1 || x != c2 +// x == c1 && x == c2 +// // where c1 and c2 are constant expressions. // If c1 and c2 are the same then it's redundant; // if c1 and c2 are different then it's always true or always false. |