From 47ab307410d01f9f683a9744e6216482aa94f1cd Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Tue, 25 Nov 2025 12:06:58 +0000 Subject: [PATCH] C++: Respond to review comments. --- .../code/cpp/ir/dataflow/internal/DataFlowUtil.qll | 13 +++++++------ 1 file changed, 7 insertions(+), 6 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 4f7a0fd61dc..1185b6a0c9c 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 @@ -2086,12 +2086,13 @@ predicate localExprFlow(Expr e1, Expr e2) { * * This is possible in _almost_ all cases, but there are cases where it is * not possible to map between a field in the uninstantiated template to a - * field in the instantiated template. This problem appears to be only in the - * case of a local class definition. So this abstract class has two - * implementations: a non-local case (where we can represent a canonical field - * as the field declaration from an uninstantiated class template or a non- - * templated class), and a local case (where we simply use the field from the - * instantiated class). + * field in the instantiated template. This happens in the case of local class + * definitions (because the local class is not the template that constructs + * the instantiation - it is the enclosing function). So this abstract class + * has two implementations: a non-local case (where we can represent a + * canonical field as the field declaration from an uninstantiated class + * template or a non-templated class), and a local case (where we simply use + * the field from the instantiated class). */ abstract private class CanonicalField extends Field { /** Gets a field represented by this canonical field. */