File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
cpp/ql/src/semmle/code/cpp/exprs Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -274,11 +274,28 @@ private predicate exprHasReferenceConversion(Expr e) { referenceConversion(e.get
274274
275275/**
276276 * A field access of a field of `this` which has no qualifier because
277- * the use of `this` is implicit. For example, `field` is equivalent to
278- * `this->field` if `field` is a member of `this`.
277+ * the use of `this` is implicit. For example, in the following code the
278+ * implicit call to the destructor of `A` has no qualifier because the
279+ * use of `this` is implicit:
280+ * ```
281+ * class A {
282+ * public:
283+ * ~A() {
284+ * // ...
285+ * }
286+ * };
279287 *
288+ * class B {
289+ * public:
290+ * A a;
291+ *
292+ * ~B() {
293+ * // Implicit call to the destructor of `A`.
294+ * }
295+ * };
296+ * ```
280297 * Note: the C++ front-end often automatically desugars `field` to
281- * `this->field`, so most implicit accesses of `this->field` are instances
298+ * `this->field`, so most accesses of `this->field` are instances
282299 * of `PointerFieldAccess` (with `ThisExpr` as the qualifier), not
283300 * `ImplicitThisFieldAccess`.
284301 */
You can’t perform that action at this time.
0 commit comments