mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
CPP: Autoformat cookbook examples.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
import cpp
|
||||
|
||||
from Cast c
|
||||
where c.getExpr().getType() instanceof FloatingPointType
|
||||
and c.getType() instanceof IntegralType
|
||||
where
|
||||
c.getExpr().getType() instanceof FloatingPointType and
|
||||
c.getType() instanceof IntegralType
|
||||
select c
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* try
|
||||
* exception
|
||||
*/
|
||||
|
||||
|
||||
import cpp
|
||||
|
||||
from CatchBlock catch
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* constructor
|
||||
* new
|
||||
*/
|
||||
|
||||
|
||||
import cpp
|
||||
|
||||
from NewExpr new, Constructor c
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* subtype
|
||||
* supertype
|
||||
*/
|
||||
|
||||
|
||||
import cpp
|
||||
|
||||
from Class type
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* test
|
||||
* boolean
|
||||
*/
|
||||
|
||||
|
||||
import cpp
|
||||
|
||||
from EqualityOperation eq, Expr trueExpr
|
||||
|
||||
@@ -6,11 +6,12 @@
|
||||
* field
|
||||
* read
|
||||
*/
|
||||
|
||||
|
||||
import cpp
|
||||
|
||||
from Field f, FieldAccess access
|
||||
where f.hasName("aDate")
|
||||
and f.getDeclaringType().hasName("Order")
|
||||
and f = access.getTarget()
|
||||
where
|
||||
f.hasName("aDate") and
|
||||
f.getDeclaringType().hasName("Order") and
|
||||
f = access.getTarget()
|
||||
select access
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* function
|
||||
* method
|
||||
*/
|
||||
|
||||
|
||||
import cpp
|
||||
|
||||
from FunctionCall call, Function fcn
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @tags integer
|
||||
* literal
|
||||
*/
|
||||
|
||||
|
||||
import cpp
|
||||
|
||||
from Literal literal
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* throw
|
||||
* exception
|
||||
*/
|
||||
|
||||
|
||||
import cpp
|
||||
|
||||
from ThrowExpr throw
|
||||
|
||||
Reference in New Issue
Block a user