Skip to content

Commit 8843a7c

Browse files
committed
Rust: rename {Implicit,FormatTemplate}VariableAccess
1 parent fc4ac9b commit 8843a7c

16 files changed

+106
-104
lines changed

rust/ql/.generated.list

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/.gitattributes

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class FormatArgsExprTree extends StandardPostOrderTree, FormatArgsExpr {
9696
result = this.getArg(i).getExpr()
9797
or
9898
result =
99-
any(ImplicitVariableAccess v, Format f, int index, int kind |
99+
any(FormatTemplateVariableAccess v, Format f, int index, int kind |
100100
f = this.getFormat(index) and
101101
(
102102
v.getArgument() = f.getArgumentRef() and kind = 0
@@ -112,7 +112,7 @@ class FormatArgsExprTree extends StandardPostOrderTree, FormatArgsExpr {
112112
}
113113
}
114114

115-
class ImplictVariableAccessTree extends LeafTree, ImplicitVariableAccess { }
115+
class FormatTemplateVariableAccessTree extends LeafTree, FormatTemplateVariableAccess { }
116116

117117
class ItemTree extends LeafTree, Item {
118118
ItemTree() {

rust/ql/lib/codeql/rust/elements.qll

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/lib/codeql/rust/elements/FormatTemplateVariableAccess.qll

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/lib/codeql/rust/elements/ImplicitVariableAccess.qll

Lines changed: 0 additions & 9 deletions
This file was deleted.

rust/ql/lib/codeql/rust/elements/internal/ImplicitVariableAccessConstructor.qll renamed to rust/ql/lib/codeql/rust/elements/internal/FormatTemplateVariableAccessConstructor.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* This module defines the hook used internally to tweak the characteristic predicate of
3-
* `ImplicitVariableAccess` synthesized instances.
3+
* `FormatTemplateVariableAccess` synthesized instances.
44
* INTERNAL: Do not use.
55
*/
66

@@ -10,10 +10,10 @@ private import codeql.rust.elements.Format
1010
private import codeql.rust.elements.NamedFormatArgument
1111

1212
/**
13-
* The characteristic predicate of `ImplicitVariableAccess` synthesized instances.
13+
* The characteristic predicate of `FormatTemplateVariableAccess` synthesized instances.
1414
* INTERNAL: Do not use.
1515
*/
16-
predicate constructImplicitVariableAccess(Raw::FormatArgsExpr parent, int index, int kind) {
16+
predicate constructFormatTemplateVariableAccess(Raw::FormatArgsExpr parent, int index, int kind) {
1717
unboundNamedFormatArgument(parent, index, kind, _)
1818
}
1919

rust/ql/lib/codeql/rust/elements/internal/ImplicitVariableAccessImpl.qll renamed to rust/ql/lib/codeql/rust/elements/internal/FormatTemplateVariableAccessImpl.qll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
/**
2-
* This module provides a hand-modifiable wrapper around the generated class `ImplicitVariableAccess`.
2+
* This module provides a hand-modifiable wrapper around the generated class `FormatTemplateVariableAccess`.
33
*
44
* INTERNAL: Do not use.
55
*/
66

7-
private import codeql.rust.elements.internal.generated.ImplicitVariableAccess
8-
private import codeql.rust.elements.internal.ImplicitVariableAccessConstructor
7+
private import codeql.rust.elements.internal.generated.FormatTemplateVariableAccess
8+
private import codeql.rust.elements.internal.FormatTemplateVariableAccessConstructor
99
private import codeql.rust.elements.internal.generated.Raw
1010
private import codeql.rust.elements.internal.generated.Synth
1111
private import codeql.rust.elements.Format
1212
private import codeql.rust.elements.NamedFormatArgument
1313

1414
/**
15-
* INTERNAL: This module contains the customizable definition of `ImplicitVariableAccess` and should not
15+
* INTERNAL: This module contains the customizable definition of `FormatTemplateVariableAccess` and should not
1616
* be referenced directly.
1717
*/
1818
module Impl {
19-
class ImplicitVariableAccess extends Generated::ImplicitVariableAccess {
19+
class FormatTemplateVariableAccess extends Generated::FormatTemplateVariableAccess {
2020
private NamedFormatArgument argument;
2121

22-
ImplicitVariableAccess() {
22+
FormatTemplateVariableAccess() {
2323
exists(Raw::FormatArgsExpr parent, int index, int kind |
24-
this = Synth::TImplicitVariableAccess(parent, index, kind) and
24+
this = Synth::TFormatTemplateVariableAccess(parent, index, kind) and
2525
unboundNamedFormatArgument(parent, index, kind, argument)
2626
)
2727
}

0 commit comments

Comments
 (0)