mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
This was already possible when the forward class declaration and the class definition occurred in the same scope. However, there is a common C++ usage pattern in which this is not the case (when only a pointer to the class is needed). In this latter scenario we could not round trip between the (forward) `DeclarationEntry` and the `Declaration`. Effectively this changes the code to: ``` if exists(TypeDeclarationEntry e | e.getType() = this) then result.getType() = this else ... ``` We use `type_decls` instead to stay close to the original code.