@@ -23,9 +23,7 @@ predicate hasResponseFileArgument(Compilation c) { c.getAnArgument().matches("@%
23
23
class CompilationArgument extends string {
24
24
Compilation compilation ;
25
25
26
- CompilationArgument ( ) {
27
- this = compilation .getAnArgument ( )
28
- }
26
+ CompilationArgument ( ) { this = compilation .getAnArgument ( ) }
29
27
}
30
28
31
29
/**
@@ -35,13 +33,11 @@ class EnableWarningFlag extends CompilationArgument {
35
33
string warningType ;
36
34
37
35
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
40
38
}
41
39
42
- string getWarningType ( ) {
43
- result = warningType
44
- }
40
+ string getWarningType ( ) { result = warningType }
45
41
}
46
42
47
43
/**
@@ -56,13 +52,11 @@ class DisableWarningFlag extends CompilationArgument {
56
52
warningType = regexpCapture ( "^-W([\\w-]+)=0" , 1 )
57
53
}
58
54
59
- string getWarningType ( ) {
60
- result = warningType
61
- }
55
+ string getWarningType ( ) { result = warningType }
62
56
}
63
57
64
58
predicate hasEnabledWarning ( Compilation c ) {
65
- exists ( EnableWarningFlag enableFlag |
59
+ exists ( EnableWarningFlag enableFlag |
66
60
c .getAnArgument ( ) = enableFlag and
67
61
not exists ( DisableWarningFlag disableFlag |
68
62
c .getAnArgument ( ) = disableFlag and
0 commit comments