We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c276d0b + b9b0c3b commit 27b6ed3Copy full SHA for 27b6ed3
cpp/ql/src/definitions.qll
@@ -208,5 +208,13 @@ Top definitionOf(Top e, string kind) {
208
// It's possible we could allow a subset of these dependencies
209
// in future, if we're careful to ensure the above don't apply.
210
not e.isFromTemplateInstantiation(_)
211
+ ) and (
212
+ // Some entities have many locations. This can arise for an external
213
+ // function that is frequently declared but not defined, or perhaps
214
+ // for a struct type that is declared in many places. Rather than
215
+ // letting the result set explode, we just exclude results that are
216
+ // "too ambiguous" -- we could also arbitrarily pick one location
217
+ // later on.
218
+ strictcount(result.getLocation()) < 10
219
)
220
}
0 commit comments