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 6e9771f commit 6b7d84aCopy full SHA for 6b7d84a
ql/ql/src/queries/style/FieldOnlyUsedInCharPred.ql
@@ -16,5 +16,10 @@ where
16
forex(FieldAccess access | access.getDeclaration() = f |
17
access.getEnclosingPredicate() = c.getCharPred()
18
) and
19
+ // excluding fields that are uniquely used in call to an IPA constructor
20
+ not unique(FieldAccess access | access.getDeclaration() = f | access) =
21
+ any(PredicateCall call |
22
+ call.getEnclosingPredicate() = c.getCharPred() and call.getTarget() instanceof NewTypeBranch
23
+ ).getAnArgument() and
24
not f.getVarDecl().overrides(_)
25
select f, "Field is only used in CharPred"
0 commit comments