File tree Expand file tree Collapse file tree 5 files changed +25
-0
lines changed
cpp/ql/src/semmle/code/cpp/ir/implementation
csharp/ql/src/semmle/code/csharp/ir/implementation Expand file tree Collapse file tree 5 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -612,6 +612,11 @@ class VariableInstruction extends Instruction {
612
612
override string getImmediateString ( ) { result = var .toString ( ) }
613
613
614
614
final IRVariable getIRVariable ( ) { result = var }
615
+
616
+ /**
617
+ * Gets the AST variable that this instruction's IR variable refers to, if one exists.
618
+ */
619
+ final Language:: Variable getASTVariable ( ) { result = var .( IRUserVariable ) .getVariable ( ) }
615
620
}
616
621
617
622
class FieldInstruction extends Instruction {
Original file line number Diff line number Diff line change @@ -612,6 +612,11 @@ class VariableInstruction extends Instruction {
612
612
override string getImmediateString ( ) { result = var .toString ( ) }
613
613
614
614
final IRVariable getIRVariable ( ) { result = var }
615
+
616
+ /**
617
+ * Gets the AST variable that this instruction's IR variable refers to, if one exists.
618
+ */
619
+ final Language:: Variable getASTVariable ( ) { result = var .( IRUserVariable ) .getVariable ( ) }
615
620
}
616
621
617
622
class FieldInstruction extends Instruction {
Original file line number Diff line number Diff line change @@ -612,6 +612,11 @@ class VariableInstruction extends Instruction {
612
612
override string getImmediateString ( ) { result = var .toString ( ) }
613
613
614
614
final IRVariable getIRVariable ( ) { result = var }
615
+
616
+ /**
617
+ * Gets the AST variable that this instruction's IR variable refers to, if one exists.
618
+ */
619
+ final Language:: Variable getASTVariable ( ) { result = var .( IRUserVariable ) .getVariable ( ) }
615
620
}
616
621
617
622
class FieldInstruction extends Instruction {
Original file line number Diff line number Diff line change @@ -612,6 +612,11 @@ class VariableInstruction extends Instruction {
612
612
override string getImmediateString ( ) { result = var .toString ( ) }
613
613
614
614
final IRVariable getIRVariable ( ) { result = var }
615
+
616
+ /**
617
+ * Gets the AST variable that this instruction's IR variable refers to, if one exists.
618
+ */
619
+ final Language:: Variable getASTVariable ( ) { result = var .( IRUserVariable ) .getVariable ( ) }
615
620
}
616
621
617
622
class FieldInstruction extends Instruction {
Original file line number Diff line number Diff line change @@ -612,6 +612,11 @@ class VariableInstruction extends Instruction {
612
612
override string getImmediateString ( ) { result = var .toString ( ) }
613
613
614
614
final IRVariable getIRVariable ( ) { result = var }
615
+
616
+ /**
617
+ * Gets the AST variable that this instruction's IR variable refers to, if one exists.
618
+ */
619
+ final Language:: Variable getASTVariable ( ) { result = var .( IRUserVariable ) .getVariable ( ) }
615
620
}
616
621
617
622
class FieldInstruction extends Instruction {
You can’t perform that action at this time.
0 commit comments