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`.