mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
C++: No need for 'matches'.
This commit is contained in:
@@ -34,7 +34,7 @@ class SqliteFunctionExecCall extends SqliteFunctionCall {
|
|||||||
|
|
||||||
class SqliteFunctionAppendfCall extends SqliteFunctionCall {
|
class SqliteFunctionAppendfCall extends SqliteFunctionCall {
|
||||||
SqliteFunctionAppendfCall() {
|
SqliteFunctionAppendfCall() {
|
||||||
this.getTarget().getName().matches(["sqlite3_str_appendf", "sqlite3_str_vappendf"])
|
this.getTarget().hasName(["sqlite3_str_appendf", "sqlite3_str_vappendf"])
|
||||||
}
|
}
|
||||||
|
|
||||||
override Expr getASource() { result = this.getArgument(any(int n | n > 0)) }
|
override Expr getASource() { result = this.getArgument(any(int n | n > 0)) }
|
||||||
@@ -42,7 +42,7 @@ class SqliteFunctionAppendfCall extends SqliteFunctionCall {
|
|||||||
|
|
||||||
class SqliteFunctionAppendNonCharCall extends SqliteFunctionCall {
|
class SqliteFunctionAppendNonCharCall extends SqliteFunctionCall {
|
||||||
SqliteFunctionAppendNonCharCall() {
|
SqliteFunctionAppendNonCharCall() {
|
||||||
this.getTarget().getName().matches(["sqlite3_str_append", "sqlite3_str_appendall"])
|
this.getTarget().hasName(["sqlite3_str_append", "sqlite3_str_appendall"])
|
||||||
}
|
}
|
||||||
|
|
||||||
override Expr getASource() { result = this.getArgument(1) }
|
override Expr getASource() { result = this.getArgument(1) }
|
||||||
@@ -57,8 +57,7 @@ class SqliteFunctionAppendCharCall extends SqliteFunctionCall {
|
|||||||
class SqliteFunctionBindCall extends SqliteFunctionCall {
|
class SqliteFunctionBindCall extends SqliteFunctionCall {
|
||||||
SqliteFunctionBindCall() {
|
SqliteFunctionBindCall() {
|
||||||
this.getTarget()
|
this.getTarget()
|
||||||
.getName()
|
.hasName([
|
||||||
.matches([
|
|
||||||
"sqlite3_bind_blob", "sqlite3_bind_blob64", "sqlite3_bind_text", "sqlite3_bind_text16",
|
"sqlite3_bind_blob", "sqlite3_bind_blob64", "sqlite3_bind_text", "sqlite3_bind_text16",
|
||||||
"sqlite3_bind_text64", "sqlite3_bind_value", "sqlite3_bind_pointer"
|
"sqlite3_bind_text64", "sqlite3_bind_value", "sqlite3_bind_pointer"
|
||||||
])
|
])
|
||||||
|
|||||||
Reference in New Issue
Block a user