mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
CPP: Un-autoformat to ease merge.
This commit is contained in:
@@ -10,17 +10,15 @@
|
||||
* statistical
|
||||
* non-attributable
|
||||
*/
|
||||
|
||||
import cpp
|
||||
|
||||
from Function f, Parameter p, Type t, int size
|
||||
where
|
||||
f.getAParameter() = p and
|
||||
p.getType() = t and
|
||||
t.getSize() = size and
|
||||
size > 64 and
|
||||
not t.getUnderlyingType() instanceof ArrayType and
|
||||
not f instanceof CopyAssignmentOperator
|
||||
select p,
|
||||
"This parameter of type $@ is " + size.toString() +
|
||||
" bytes - consider passing a const pointer/reference instead.", t, t.toString()
|
||||
where f.getAParameter() = p
|
||||
and p.getType() = t
|
||||
and t.getSize() = size
|
||||
and size > 64
|
||||
and not t.getUnderlyingType() instanceof ArrayType
|
||||
and not f instanceof CopyAssignmentOperator
|
||||
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