mirror of
https://github.com/github/codeql.git
synced 2026-02-09 11:41:06 +01:00
Add the ql/primary-ql-class-consistency query
This commit is contained in:
committed by
GitHub
parent
e01fe66519
commit
e8cc0ee453
@@ -630,7 +630,11 @@ class String extends Literal {
|
||||
override string getAPrimaryQlClass() { result = "String" }
|
||||
|
||||
/** Gets the string value of this literal. */
|
||||
string getValue() { result = lit.getChild().(Generated::String).getValue() }
|
||||
string getValue() {
|
||||
exists(string raw | raw = lit.getChild().(Generated::String).getValue() |
|
||||
result = raw.substring(1, raw.length() - 1)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/** An integer literal. */
|
||||
@@ -1198,10 +1202,8 @@ class ModuleExpr extends TModuleExpr, ModuleRef {
|
||||
|
||||
override AstNode getParent() {
|
||||
result = super.getParent() or
|
||||
result.(PredicateCall).getQualifier() = this
|
||||
or
|
||||
result.(PredicateExpr).getQualifier() = this
|
||||
or
|
||||
result.(PredicateCall).getQualifier() = this or
|
||||
result.(PredicateExpr).getQualifier() = this or
|
||||
result.(Module).getAlias() = this
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user