File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
cpp/ql/lib/semmle/code/cpp Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -1699,7 +1699,28 @@ class AutoType extends TemplateParameter {
1699
1699
1700
1700
private predicate suppressUnusedThis ( Type t ) { any ( ) }
1701
1701
1702
- /** A source code location referring to a type */
1702
+ /**
1703
+ * A source code location referring to a user-defined type.
1704
+ *
1705
+ * Note that only _user-defined_ types have `TypeMention`s. In particular,
1706
+ * built-in types, and derived types with built-in types as their base don't
1707
+ * have any `TypeMention`s. For example, given
1708
+ * ```cpp
1709
+ * struct S { ... };
1710
+ * void f(S s1, int i1) {
1711
+ * S s2;
1712
+ * S* s3;
1713
+ * S& s4 = s2;
1714
+ * decltype(s2) s5;
1715
+ *
1716
+ * int i2;
1717
+ * int* i3;
1718
+ * int i4[10];
1719
+ * }
1720
+ * ```
1721
+ * there will be a `TypeMention` for the mention of `S` at `S s1`, `S s2`, and `S& s4 = s2`,
1722
+ * but not at `decltype(s2) s5`. Additionally, there will be no `TypeMention`s for `int`.
1723
+ */
1703
1724
class TypeMention extends Locatable , @type_mention {
1704
1725
override string toString ( ) { result = "type mention" }
1705
1726
You can’t perform that action at this time.
0 commit comments