File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -19,20 +19,20 @@ import codingstandards.cpp.standardlibrary.FileAccess
1919
2020class PrettyPrintExpr extends Expr {
2121 PrettyPrintExpr ( ) {
22- this instanceof BinaryOperation
23- or
24- this instanceof Literal
22+ exists ( FOpenCall fopen | this .getParent * ( ) = fopen .getMode ( ) ) and
23+ (
24+ this instanceof BinaryOperation
25+ or
26+ this instanceof Literal
27+ )
2528 }
2629}
2730
28- string prettyPrint ( Expr e ) {
29- result = PrintExpr< PrettyPrintExpr > :: print ( e )
30- }
31-
32- from FOpenCall fopen
31+ from FOpenCall fopen , string modeStr
3332where
3433 not isExcluded ( fopen , IO5Package:: fopenWithNonExclusiveFileCreationModeQuery ( ) ) and
3534 fopen .mayCreate ( ) and
36- not fopen .isExclusiveMode ( )
35+ not fopen .isExclusiveMode ( ) and
36+ modeStr = PrintExpr< PrettyPrintExpr > :: print ( fopen .getMode ( ) )
3737select fopen ,
38- "Call to create file with non-exclusive creation mode '" + prettyPrint ( fopen . getMode ( ) ) + "'."
38+ "Call to create file with non-exclusive creation mode '" + modeStr + "'."
You can’t perform that action at this time.
0 commit comments