Skip to content

Commit 57f3ac8

Browse files
authored
Merge pull request #226 from adityasharad/merge/1.18-master-250918
Merge rc/1.18 into master.
2 parents 397c8b5 + 2832956 commit 57f3ac8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cpp/ql/src/definitions.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ private predicate constructorCallStartLoc(ConstructorCall cc, File f, int line,
102102

103103
/**
104104
* Holds if `f`, `line`, `column` indicate the start character
105-
* of `tm`, which mentions `t`.
105+
* of `tm`, which mentions `t`. Type mentions for instantiations
106+
* are filtered out.
106107
*/
107108
private predicate typeMentionStartLoc(TypeMention tm, Type t, File f, int line, int column) {
108109
exists(Location l |
@@ -111,7 +112,8 @@ private predicate typeMentionStartLoc(TypeMention tm, Type t, File f, int line,
111112
l.getStartLine() = line and
112113
l.getStartColumn() = column
113114
) and
114-
t = tm.getMentionedType()
115+
t = tm.getMentionedType() and
116+
not t instanceof ClassTemplateInstantiation
115117
}
116118

117119
/**

0 commit comments

Comments
 (0)