Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 53f522c

Browse files
author
Robert Marsh
committed
C++: respond to PR comments and autoformat
1 parent bace8c7 commit 53f522c

9 files changed

Lines changed: 205 additions & 204 deletions

File tree

cpp/ql/src/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ class TranslatedStructorCallSideEffects extends TranslatedSideEffects {
378378
TranslatedStructorCallSideEffects() { getParent().(TranslatedStructorCall).hasQualifier() }
379379

380380
override predicate hasInstruction(Opcode opcode, InstructionTag tag, Type t, boolean isGLValue) {
381-
opcode instanceof Opcode::IndirectMustWriteSideEffect and
381+
opcode instanceof Opcode::IndirectMayWriteSideEffect and
382382
tag instanceof OnlyInstructionTag and
383383
t = expr.getTarget().getDeclaringType() and
384384
isGLValue = false
@@ -566,4 +566,3 @@ class TranslatedSideEffect extends TranslatedElement, TTranslatedArgumentSideEff
566566
*/
567567
override Function getFunction() { result = arg.getEnclosingFunction() }
568568
}
569-

cpp/ql/src/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,10 @@ newtype TTranslatedElement =
371371
TTranslatedAllocationSize(NewOrNewArrayExpr newExpr) { not ignoreExpr(newExpr) } or
372372
// The declaration/initialization part of a `ConditionDeclExpr`
373373
TTranslatedConditionDecl(ConditionDeclExpr expr) { not ignoreExpr(expr) } or
374-
// The side effects of a `Call` {
375-
TTranslatedSideEffects(Call expr) { exists(TTranslatedArgumentSideEffect(expr, _, _, _)) or expr instanceof ConstructorCall } or // A precise side effect of an argument to a `Call` {
374+
// The side effects of a `Call`
375+
TTranslatedSideEffects(Call expr) {
376+
exists(TTranslatedArgumentSideEffect(expr, _, _, _)) or expr instanceof ConstructorCall
377+
} or // A precise side effect of an argument to a `Call`
376378
TTranslatedArgumentSideEffect(Call call, Expr expr, int n, boolean isWrite) {
377379
(
378380
expr = call.getArgument(n).getFullyConverted()

cpp/ql/test/library-tests/ir/ir/aliased_ssa_sanity.expected

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
missingOperand
2-
| ir.cpp:809:7:809:13 | IndirectMustWriteSideEffect: call to Base | Instruction 'IndirectMustWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
3-
| ir.cpp:810:7:810:26 | IndirectMustWriteSideEffect: call to Base | Instruction 'IndirectMustWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
4-
| ir.cpp:823:7:823:13 | IndirectMustWriteSideEffect: call to Base | Instruction 'IndirectMustWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
5-
| ir.cpp:824:7:824:26 | IndirectMustWriteSideEffect: call to Base | Instruction 'IndirectMustWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
2+
| ir.cpp:809:7:809:13 | IndirectMayWriteSideEffect: call to Base | Instruction 'IndirectMayWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
3+
| ir.cpp:810:7:810:26 | IndirectMayWriteSideEffect: call to Base | Instruction 'IndirectMayWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
4+
| ir.cpp:823:7:823:13 | IndirectMayWriteSideEffect: call to Base | Instruction 'IndirectMayWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
5+
| ir.cpp:824:7:824:26 | IndirectMayWriteSideEffect: call to Base | Instruction 'IndirectMayWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
66
unexpectedOperand
77
duplicateOperand
88
missingPhiOperand

cpp/ql/test/library-tests/ir/ir/raw_ir.expected

Lines changed: 82 additions & 82 deletions
Large diffs are not rendered by default.

cpp/ql/test/library-tests/ir/ir/raw_sanity.expected

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
missingOperand
2-
| ir.cpp:809:7:809:13 | IndirectMustWriteSideEffect: call to Base | Instruction 'IndirectMustWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
3-
| ir.cpp:810:7:810:26 | IndirectMustWriteSideEffect: call to Base | Instruction 'IndirectMustWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
4-
| ir.cpp:823:7:823:13 | IndirectMustWriteSideEffect: call to Base | Instruction 'IndirectMustWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
5-
| ir.cpp:824:7:824:26 | IndirectMustWriteSideEffect: call to Base | Instruction 'IndirectMustWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
2+
| ir.cpp:809:7:809:13 | IndirectMayWriteSideEffect: call to Base | Instruction 'IndirectMayWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
3+
| ir.cpp:810:7:810:26 | IndirectMayWriteSideEffect: call to Base | Instruction 'IndirectMayWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
4+
| ir.cpp:823:7:823:13 | IndirectMayWriteSideEffect: call to Base | Instruction 'IndirectMayWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
5+
| ir.cpp:824:7:824:26 | IndirectMayWriteSideEffect: call to Base | Instruction 'IndirectMayWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
66
unexpectedOperand
77
duplicateOperand
88
missingPhiOperand

cpp/ql/test/library-tests/ir/ir/unaliased_ssa_sanity.expected

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
missingOperand
2-
| ir.cpp:809:7:809:13 | IndirectMustWriteSideEffect: call to Base | Instruction 'IndirectMustWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
3-
| ir.cpp:810:7:810:26 | IndirectMustWriteSideEffect: call to Base | Instruction 'IndirectMustWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
4-
| ir.cpp:823:7:823:13 | IndirectMustWriteSideEffect: call to Base | Instruction 'IndirectMustWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
5-
| ir.cpp:824:7:824:26 | IndirectMustWriteSideEffect: call to Base | Instruction 'IndirectMustWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
2+
| ir.cpp:809:7:809:13 | IndirectMayWriteSideEffect: call to Base | Instruction 'IndirectMayWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
3+
| ir.cpp:810:7:810:26 | IndirectMayWriteSideEffect: call to Base | Instruction 'IndirectMayWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
4+
| ir.cpp:823:7:823:13 | IndirectMayWriteSideEffect: call to Base | Instruction 'IndirectMayWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
5+
| ir.cpp:824:7:824:26 | IndirectMayWriteSideEffect: call to Base | Instruction 'IndirectMayWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
66
unexpectedOperand
77
duplicateOperand
88
missingPhiOperand

0 commit comments

Comments
 (0)