Skip to content

Commit

Permalink
Rust: rename {Implicit,FormatTemplate}VariableAccess
Browse files Browse the repository at this point in the history
  • Loading branch information
aibaars committed Oct 22, 2024
1 parent 61a74d3 commit 1f80f7b
Show file tree
Hide file tree
Showing 16 changed files with 106 additions and 104 deletions.
14 changes: 7 additions & 7 deletions rust/ql/.generated.list

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rust/ql/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class FormatArgsExprTree extends StandardPostOrderTree, FormatArgsExpr {
result = this.getArg(i).getExpr()
or
result =
any(ImplicitVariableAccess v, Format f, int index, int kind |
any(FormatTemplateVariableAccess v, Format f, int index, int kind |
f = this.getFormat(index) and
(
v.getArgument() = f.getArgumentRef() and kind = 0
Expand All @@ -110,7 +110,7 @@ class FormatArgsExprTree extends StandardPostOrderTree, FormatArgsExpr {
}
}

class ImplictVariableAccessTree extends LeafTree, ImplicitVariableAccess { }
class FormatTemplateVariableAccessTree extends LeafTree, FormatTemplateVariableAccess { }

class ItemTree extends LeafTree, Item {
ItemTree() {
Expand Down
2 changes: 1 addition & 1 deletion rust/ql/lib/codeql/rust/elements.qll

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions rust/ql/lib/codeql/rust/elements/ImplicitVariableAccess.qll

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* This module defines the hook used internally to tweak the characteristic predicate of
* `ImplicitVariableAccess` synthesized instances.
* `FormatTemplateVariableAccess` synthesized instances.
* INTERNAL: Do not use.
*/

Expand All @@ -10,10 +10,10 @@ private import codeql.rust.elements.Format
private import codeql.rust.elements.NamedFormatArgument

/**
* The characteristic predicate of `ImplicitVariableAccess` synthesized instances.
* The characteristic predicate of `FormatTemplateVariableAccess` synthesized instances.
* INTERNAL: Do not use.
*/
predicate constructImplicitVariableAccess(Raw::FormatArgsExpr parent, int index, int kind) {
predicate constructFormatTemplateVariableAccess(Raw::FormatArgsExpr parent, int index, int kind) {
unboundNamedFormatArgument(parent, index, kind, _)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
/**
* This module provides a hand-modifiable wrapper around the generated class `ImplicitVariableAccess`.
* This module provides a hand-modifiable wrapper around the generated class `FormatTemplateVariableAccess`.
*
* INTERNAL: Do not use.
*/

private import codeql.rust.elements.internal.generated.ImplicitVariableAccess
private import codeql.rust.elements.internal.ImplicitVariableAccessConstructor
private import codeql.rust.elements.internal.generated.FormatTemplateVariableAccess
private import codeql.rust.elements.internal.FormatTemplateVariableAccessConstructor
private import codeql.rust.elements.internal.generated.Raw
private import codeql.rust.elements.internal.generated.Synth
private import codeql.rust.elements.Format
private import codeql.rust.elements.NamedFormatArgument

/**
* INTERNAL: This module contains the customizable definition of `ImplicitVariableAccess` and should not
* INTERNAL: This module contains the customizable definition of `FormatTemplateVariableAccess` and should not
* be referenced directly.
*/
module Impl {
class ImplicitVariableAccess extends Generated::ImplicitVariableAccess {
class FormatTemplateVariableAccess extends Generated::FormatTemplateVariableAccess {
private NamedFormatArgument argument;

ImplicitVariableAccess() {
FormatTemplateVariableAccess() {
exists(Raw::FormatArgsExpr parent, int index, int kind |
this = Synth::TImplicitVariableAccess(parent, index, kind) and
this = Synth::TFormatTemplateVariableAccess(parent, index, kind) and
unboundNamedFormatArgument(parent, index, kind, argument)
)
}
Expand Down
Loading

0 comments on commit 1f80f7b

Please sign in to comment.