MCPcopy Create free account
hub / github.com/LFYSec/MScan / Return

Class Return

src/main/java/pascal/taie/ir/stmt/Return.java:34–71  ·  view source on GitHub ↗

Representation of return statement, e.g., return; or return x.

Source from the content-addressed store, hash-verified

32 * Representation of return statement, e.g., return; or return x.
33 */
34public class Return extends AbstractStmt {
35
36 @Nullable
37 private final Var value;
38
39 public Return(@Nullable Var value) {
40 this.value = value;
41 }
42
43 public Return() {
44 this(null);
45 }
46
47 @Nullable
48 public Var getValue() {
49 return value;
50 }
51
52 @Override
53 public Set<RValue> getUses() {
54 return value != null ? Set.of(value) : Set.of();
55 }
56
57 @Override
58 public boolean canFallThrough() {
59 return false;
60 }
61
62 @Override
63 public <T> T accept(StmtVisitor<T> visitor) {
64 return visitor.visit(this);
65 }
66
67 @Override
68 public String toString() {
69 return value != null ? "return " + value : "return";
70 }
71}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected