Skip to content

Commit 5f92932

Browse files
committed
Remove the original from-where-select clauses this query predicate was adapted from
1 parent 890f0ae commit 5f92932

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

cpp/common/src/codingstandards/cpp/rules/objectassignedtoanoverlappingobject/ObjectAssignedToAnOverlappingObject.qll

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,6 @@ query predicate problems(
4141
AssignExpr assignExpr, string message, ValueFieldAccess valuelhs, string valuelhsTargetName,
4242
ValueFieldAccess valuerhs, string valuerhsTargetName
4343
) {
44-
/*
45-
* from AssignExpr assignExpr, Expr lhs, Expr rhs, ValueFieldAccess valuelhs, ValueFieldAccess valuerhs
46-
* where
47-
* not isExcluded(assignExpr, Contracts7Package::objectAssignedToAnOverlappingObjectQuery()) and
48-
* lhs.getType() instanceof Union and
49-
* rhs.getType() instanceof Union and
50-
* lhs = getAQualifier(assignExpr.getLValue()) and
51-
* rhs = getAQualifier(assignExpr.getRValue()) and
52-
* globalValueNumber(lhs) = globalValueNumber(rhs) and
53-
* valuerhs = assignExpr.getRValue() and
54-
* valuelhs = assignExpr.getLValue() and // a.b.c == ((a.b).c)
55-
* overlaps(valuelhs, valuerhs)
56-
* select assignExpr, "An object $@ assigned to overlapping object $@.", valuelhs,
57-
* valuelhs.getTarget().getName(), valuerhs, valuerhs.getTarget().getName()
58-
*/
59-
6044
exists(Expr lhs, Expr rhs |
6145
not isExcluded(assignExpr, getQuery()) and
6246
lhs.getType() instanceof Union and

cpp/common/src/codingstandards/cpp/rules/objectcopiedtoanoverlappingobject/ObjectCopiedToAnOverlappingObject.qll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,6 @@ query predicate problems(
9494
OverlappingCopy copy, string message, Expr copySrc, string fromLiteral, Expr copyDst,
9595
string toLiteral
9696
) {
97-
/*
98-
* from OverlappingCopy copy
99-
* where
100-
* not isExcluded(copy, Contracts7Package::objectCopiedToAnOverlappingObjectQuery()) and
101-
* copy.overlaps()
102-
* select copy, "The object to copy $@ overlaps the object to copy $@.", copy.getSrc(), "from",
103-
* copy.getDst(), "to"
104-
*/
105-
10697
not isExcluded(copy, getQuery()) and
10798
copy.overlaps() and
10899
message = "The object to copy $@ overlaps the object to copy $@." and

0 commit comments

Comments
 (0)