Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class HarmlessNestedExpr extends BinaryExpr {
*/
predicate interestingNesting(BinaryExpr inner, BinaryExpr outer) {
inner = outer.getAChildExpr() and
not isParenthesized(inner, _) and
not inner instanceof AssocNestedExpr and
not inner instanceof HarmlessNestedExpr
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ package main
func weightedMeanGood(a, b float64, countA, countB, total int) float64 {
return ((a * float64(countA)) + (b * float64(countB))) / float64(total)
}

func parenthesizedGood(a, b, c int) int {
return (a ^ b)&c
}
Loading