From c7e5dc2e9e48dbd57561272da01a5f2fd4741097 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Mon, 26 Jun 2023 12:18:05 +0200 Subject: [PATCH] C++: Fix QLDoc issues --- .../code/cpp/ir/dataflow/internal/DataFlowUtil.qll | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll index 11a4b817dbf..209d0246832 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll @@ -1833,6 +1833,9 @@ class Content extends TContent { path = "" and sl = 0 and sc = 0 and el = 0 and ec = 0 } + /** Gets the indirection index of this `Content`. */ + abstract int getIndirectionIndex(); + /** * INTERNAL: Do not use. * @@ -1843,15 +1846,6 @@ class Content extends TContent { * the form `*f` is also cleared. */ abstract predicate impliesClearOf(Content c); - - abstract int getIndirectionIndex(); -} - -predicate foo(FieldContent f) { - exists(int i, Field ff | - i = f.getIndirectionIndex() and - ff = f.getField() - ) } /** A reference through a non-union instance field. */ @@ -1869,6 +1863,7 @@ class FieldContent extends Content, TFieldContent { Field getField() { result = f } + /** Gets the indirection index of this `FieldContent`. */ pragma[inline] override int getIndirectionIndex() { pragma[only_bind_into](result) = pragma[only_bind_out](indirectionIndex)