@@ -23,9 +23,7 @@ predicate hasResponseFileArgument(Compilation c) { c.getAnArgument().matches("@%
2323class CompilationArgument extends string {
2424 Compilation compilation ;
2525
26- CompilationArgument ( ) {
27- this = compilation .getAnArgument ( )
28- }
26+ CompilationArgument ( ) { this = compilation .getAnArgument ( ) }
2927}
3028
3129/**
@@ -35,13 +33,11 @@ class EnableWarningFlag extends CompilationArgument {
3533 string warningType ;
3634
3735 EnableWarningFlag ( ) {
38- warningType = regexpCapture ( "^-W([\\w-]+)(=.*)?$" , 1 )
39- and not this instanceof DisableWarningFlag
36+ warningType = regexpCapture ( "^-W([\\w-]+)(=.*)?$" , 1 ) and
37+ not this instanceof DisableWarningFlag
4038 }
4139
42- string getWarningType ( ) {
43- result = warningType
44- }
40+ string getWarningType ( ) { result = warningType }
4541}
4642
4743/**
@@ -56,13 +52,11 @@ class DisableWarningFlag extends CompilationArgument {
5652 warningType = regexpCapture ( "^-W([\\w-]+)=0" , 1 )
5753 }
5854
59- string getWarningType ( ) {
60- result = warningType
61- }
55+ string getWarningType ( ) { result = warningType }
6256}
6357
6458predicate hasEnabledWarning ( Compilation c ) {
65- exists ( EnableWarningFlag enableFlag |
59+ exists ( EnableWarningFlag enableFlag |
6660 c .getAnArgument ( ) = enableFlag and
6761 not exists ( DisableWarningFlag disableFlag |
6862 c .getAnArgument ( ) = disableFlag and
0 commit comments