Skip to content

Commit 02c18e7

Browse files
committed
C++: Mention 'range-based for-loops' in the QLDoc for 'IRDeclarationEntry'.
1 parent 10f962f commit 02c18e7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,10 @@ private module IRDeclarationEntries {
469469
/**
470470
* An entity that represents a declaration entry in the database.
471471
*
472-
* This class exists to work around the fact that `DeclStmt`s in
473-
* template instantiations do not have `DeclarationEntry`s.
472+
* This class exists to work around the fact that `DeclStmt`s in some cases
473+
* do not have `DeclarationEntry`s. Currently, this is the case for:
474+
* - `DeclStmt`s in template instantiations.
475+
* - `DeclStmt`s that are generated by the desugaring of range-based for-loops.
474476
*
475477
* So instead, the IR works with `IRDeclarationEntry`s that synthesize missing
476478
* `DeclarationEntry`s when there is no result for `DeclStmt::getDeclarationEntry`.

0 commit comments

Comments
 (0)