mirror of
https://github.com/github/codeql.git
synced 2026-05-04 13:15:21 +02:00
CPP: Fix for functions with no definition.
This commit is contained in:
@@ -30,6 +30,8 @@ where f.getAParameter() = p
|
||||
exists(FunctionCall fc | fc.getQualifier().getAChild*() = a and not fc.getTarget().hasSpecifier("const"))
|
||||
)
|
||||
)
|
||||
// if there's no block, we can't tell how the parameter is used
|
||||
and exists(f.getBlock())
|
||||
select
|
||||
p, "This parameter of type $@ is " + size.toString() + " bytes - consider passing a const pointer/reference instead.",
|
||||
t, t.toString()
|
||||
|
||||
Reference in New Issue
Block a user