From 02c18e714bd803cedff9ff02e3d7c36709de7fb2 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Tue, 6 Sep 2022 10:40:01 +0100 Subject: [PATCH] C++: Mention 'range-based for-loops' in the QLDoc for 'IRDeclarationEntry'. --- .../ir/implementation/raw/internal/TranslatedElement.qll | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll index 5311b757caf..3a350ea0e1a 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll @@ -469,8 +469,10 @@ private module IRDeclarationEntries { /** * An entity that represents a declaration entry in the database. * - * This class exists to work around the fact that `DeclStmt`s in - * template instantiations do not have `DeclarationEntry`s. + * This class exists to work around the fact that `DeclStmt`s in some cases + * do not have `DeclarationEntry`s. Currently, this is the case for: + * - `DeclStmt`s in template instantiations. + * - `DeclStmt`s that are generated by the desugaring of range-based for-loops. * * So instead, the IR works with `IRDeclarationEntry`s that synthesize missing * `DeclarationEntry`s when there is no result for `DeclStmt::getDeclarationEntry`.