Skip to content

Commit fca1411

Browse files
committed
C++: Address review.
1 parent a82cf74 commit fca1411

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

cpp/ql/src/definitions.ql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@ import definitions
1111
from Top e, Top def, string kind
1212
where
1313
def = definitionOf(e, kind) and
14+
// We need to exclude definitions for elements inside template instantiations,
15+
// as these often lead to multiple links to definitions from the same source location.
16+
// LGTM does not support this bevaviour.
1417
not e.isFromTemplateInstantiation(_)
1518
select e, def, kind

cpp/ql/src/localDefinitions.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ external string selectedSourceFile();
1313

1414
from Top e, Top def, string kind
1515
where def = definitionOf(e, kind) and e.getFile() = getEncodedFile(selectedSourceFile())
16-
select e.getLocation(), def.getLocation(), kind
16+
select e, def, kind

0 commit comments

Comments
 (0)