CPP: Autoformat cookbook examples.

This commit is contained in:
Anders Schack-Mulligen
2019-08-02 15:29:20 +02:00
parent 9b74e9c4a4
commit d6e1ba6bed
9 changed files with 15 additions and 13 deletions

View File

@@ -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

View File

@@ -6,7 +6,7 @@
* try
* exception
*/
import cpp
from CatchBlock catch

View File

@@ -6,7 +6,7 @@
* constructor
* new
*/
import cpp
from NewExpr new, Constructor c

View File

@@ -10,7 +10,7 @@
* subtype
* supertype
*/
import cpp
from Class type

View File

@@ -7,7 +7,7 @@
* test
* boolean
*/
import cpp
from EqualityOperation eq, Expr trueExpr

View File

@@ -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

View File

@@ -6,7 +6,7 @@
* function
* method
*/
import cpp
from FunctionCall call, Function fcn

View File

@@ -5,7 +5,7 @@
* @tags integer
* literal
*/
import cpp
from Literal literal

View File

@@ -7,7 +7,7 @@
* throw
* exception
*/
import cpp
from ThrowExpr throw