Skip to content

Commit 30f8894

Browse files
committed
QL: run the redundat inline cast patch
1 parent 571995c commit 30f8894

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ql/ql/src/codeql_ql/ast/Ast.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ class Module extends TModule, ModuleDeclaration {
673673

674674
override string getAPrimaryQlClass() { result = "Module" }
675675

676-
override string getName() { result = mod.getName().(QL::ModuleName).getChild().getValue() }
676+
override string getName() { result = mod.getName().getChild().getValue() }
677677

678678
/**
679679
* Gets a member of the module.

ql/ql/src/queries/style/GetAPrimaryQlClassConsistency.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ where
1616
pred.getParent().getName() = className and
1717
pred.getName() = "getAPrimaryQlClass" and
1818
constant = pred.getBody().(ComparisonFormula).getRightOperand() and
19-
constant.(String).getValue() = constantName and
19+
constant.getValue() = constantName and
2020
// might be "Foo::classname", detect by matching with a regexp
2121
not constantName.regexpMatch(".*\\b" + className + "$") and
2222
// ignore constants with "?" in them

0 commit comments

Comments
 (0)