Skip to content

Commit f8700ba

Browse files
authored
Merge pull request #27 from jsinglet/jsinglet/deadlock-shared-performance-fix-26
Removed Unneeded Predicate Clause
2 parents 3f4a9c9 + de6c69e commit f8700ba

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- `CON53-CPP` - `DeadlockByLockingInPredefinedOrder.ql`
2+
- Optimized performance by removing unneeded conditionals.
3+
- `CON35-C` - `DeadlockByLockingInPredefinedOrder.ql`
4+
- Optimized performance by removing unneeded conditionals.

cpp/common/src/codingstandards/cpp/rules/preventdeadlockbylockinginpredefinedorder/PreventDeadlockByLockingInPredefinedOrder.qll

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ predicate getAnOrderedLockPair(
2525
lock2 = node.coveredByLock() and
2626
not lock1 = lock2 and
2727
lock1.getEnclosingFunction() = lock2.getEnclosingFunction() and
28-
node.(Expr).getEnclosingFunction() = lock1.getEnclosingFunction() and
2928
exists(Location l1Loc, Location l2Loc |
3029
l1Loc = lock1.getLocation() and
3130
l2Loc = lock2.getLocation()

0 commit comments

Comments
 (0)