mirror of
https://github.com/github/codeql.git
synced 2026-05-04 05:05:12 +02:00
Python: Change all remaining occurrences of StrConst
Done using ``` git grep StrConst | xargs sed -i 's/StrConst/StringLiteral/g' ```
This commit is contained in:
@@ -8,7 +8,7 @@ where
|
||||
not exists(val.getConversion()) and typeconv = " "
|
||||
) and
|
||||
(
|
||||
format = val.getFormatSpec().getValue(0).(StrConst).getText()
|
||||
format = val.getFormatSpec().getValue(0).(StringLiteral).getText()
|
||||
or
|
||||
not exists(val.getFormatSpec()) and format = ""
|
||||
)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import python
|
||||
|
||||
string repr(AstNode a) {
|
||||
not a instanceof StrConst and result = a.toString()
|
||||
not a instanceof StringLiteral and result = a.toString()
|
||||
or
|
||||
result = "\"" + a.(StrConst).getText() + "\""
|
||||
result = "\"" + a.(StringLiteral).getText() + "\""
|
||||
}
|
||||
|
||||
from ControlFlowNode p, ControlFlowNode s, BasicBlock b, int n
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import python
|
||||
|
||||
string repr(AstNode a) {
|
||||
not a instanceof StrConst and result = a.toString()
|
||||
not a instanceof StringLiteral and result = a.toString()
|
||||
or
|
||||
result = "\"" + a.(StrConst).getText() + "\""
|
||||
result = "\"" + a.(StringLiteral).getText() + "\""
|
||||
}
|
||||
|
||||
from ControlFlowNode p, ControlFlowNode s, BasicBlock b, int n
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import python
|
||||
|
||||
from StrConst s
|
||||
from StringLiteral s
|
||||
select s, s.getText()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import python
|
||||
|
||||
from StrConst s
|
||||
from StringLiteral s
|
||||
select s.getLocation().getStartLine(), s.getText(), s.getPrefix()
|
||||
|
||||
Reference in New Issue
Block a user