We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89dcad4 commit cf21997Copy full SHA for cf21997
cpp/ql/src/Critical/InitialisationNotRun.ql
@@ -32,9 +32,18 @@ predicate called(Function f) {
32
exists(FunctionAccess fa | fa.getTarget() = f)
33
}
34
35
+predicate staticWithoutDereference(GlobalVariable v) {
36
+ v.isStatic() and
37
+ not exists(VariableAccess va |
38
+ va = v.getAnAccess() and
39
+ dereferenced(va)
40
+ )
41
+}
42
+
43
from GlobalVariable v
44
where
45
global(v) and
46
+ not staticWithoutDereference(v) and
47
not exists(VariableAccess lval |
48
v.getAnAccess() = lval and
49
lval.isUsedAsLValue() and
0 commit comments