QL: run the redundat inline cast patch

This commit is contained in:
Erik Krogh Kristensen
2021-12-17 20:50:15 +01:00
parent 571995c929
commit 30f8894854
2 changed files with 2 additions and 2 deletions

View File

@@ -673,7 +673,7 @@ class Module extends TModule, ModuleDeclaration {
override string getAPrimaryQlClass() { result = "Module" }
override string getName() { result = mod.getName().(QL::ModuleName).getChild().getValue() }
override string getName() { result = mod.getName().getChild().getValue() }
/**
* Gets a member of the module.

View File

@@ -16,7 +16,7 @@ where
pred.getParent().getName() = className and
pred.getName() = "getAPrimaryQlClass" and
constant = pred.getBody().(ComparisonFormula).getRightOperand() and
constant.(String).getValue() = constantName and
constant.getValue() = constantName and
// might be "Foo::classname", detect by matching with a regexp
not constantName.regexpMatch(".*\\b" + className + "$") and
// ignore constants with "?" in them