File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed
lib/semmle/code/cpp/ir/dataflow/internal
test/library-tests/syntax-zoo Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -390,7 +390,7 @@ private class Node0 extends Node, TNode0 {
390
390
391
391
override DataFlowType getType ( ) { result = node .getType ( ) }
392
392
393
- final override Location getLocationImpl ( ) { result = node .getLocationImpl ( ) }
393
+ override Location getLocationImpl ( ) { result = node .getLocationImpl ( ) }
394
394
395
395
override string toStringImpl ( ) {
396
396
// This predicate is overridden in subclasses. This default implementation
@@ -413,6 +413,8 @@ class InstructionNode extends Node0 {
413
413
/** Gets the instruction corresponding to this node. */
414
414
Instruction getInstruction ( ) { result = instr }
415
415
416
+ override Location getLocationImpl ( ) { result = instr .getAst ( ) .getLocation ( ) }
417
+
416
418
override string toStringImpl ( ) {
417
419
if instr .( InitializeParameterInstruction ) .getIRVariable ( ) instanceof IRThisVariable
418
420
then result = "this"
@@ -432,6 +434,8 @@ class OperandNode extends Node, Node0 {
432
434
/** Gets the operand corresponding to this node. */
433
435
Operand getOperand ( ) { result = op }
434
436
437
+ override Location getLocationImpl ( ) { result = op .getDef ( ) .getAst ( ) .getLocation ( ) }
438
+
435
439
override string toStringImpl ( ) {
436
440
if op .getDef ( ) .( InitializeParameterInstruction ) .getIRVariable ( ) instanceof IRThisVariable
437
441
then result = "this"
Original file line number Diff line number Diff line change 1
1
uniqueEnclosingCallable
2
2
uniqueType
3
3
uniqueNodeLocation
4
- | cpp11.cpp:28:21:28:21 | (__range) | Node should have one location but has 2. |
5
- | cpp11.cpp:28:21:28:21 | (__range) | Node should have one location but has 2. |
6
- | file://:0:0:0:0 | (__range) | Node should have one location but has 2. |
7
- | file://:0:0:0:0 | (__range) | Node should have one location but has 2. |
8
- | file://:0:0:0:0 | (__range) | Node should have one location but has 2. |
9
- | file://:0:0:0:0 | (__range) | Node should have one location but has 2. |
10
4
| file://:0:0:0:0 | (unnamed parameter 2) | Node should have one location but has 0. |
11
5
| file://:0:0:0:0 | (unnamed parameter 2) | Node should have one location but has 0. |
12
6
| file://:0:0:0:0 | (unnamed parameter 2) | Node should have one location but has 0. |
@@ -19,12 +13,6 @@ uniqueNodeLocation
19
13
| file://:0:0:0:0 | (unnamed parameter 2) indirection | Node should have one location but has 0. |
20
14
| file://:0:0:0:0 | (unnamed parameter 2) indirection | Node should have one location but has 0. |
21
15
| file://:0:0:0:0 | (unnamed parameter 2) indirection | Node should have one location but has 0. |
22
- | file://:0:0:0:0 | this | Node should have one location but has 2. |
23
- | file://:0:0:0:0 | this | Node should have one location but has 2. |
24
- | ir.cpp:756:8:756:8 | this | Node should have one location but has 2. |
25
- | ir.cpp:765:8:765:8 | this | Node should have one location but has 2. |
26
- | stream_it.cpp:11:16:11:16 | (__range) | Node should have one location but has 2. |
27
- | stream_it.cpp:11:16:11:16 | (__range) | Node should have one location but has 2. |
28
16
missingLocation
29
17
| Nodes without location: 12 |
30
18
uniqueNodeToString
You can’t perform that action at this time.
0 commit comments