C++: Fix IR variable reuse for global var inits#8912
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
I fixed the test regressions caused by running against the old frontend. However, it turns out, also some syntax zoo tests broke (unrelated to the frontend). I could update those, but I cannot tell if the changes are correct. Also the IR This becomes: Which |
37fb227 to
fe52dd9
Compare
Fixed by d1c6022 |
Thanks. Would it be possible to add |
|
Good call - I've added the test and fixed another case of missing variables |
cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedGlobalVar.qll
Fixed
Show fixed
Hide fixed
cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedGlobalVar.qll
Fixed
Show fixed
Hide fixed
cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedGlobalVar.qll
Fixed
Show fixed
Hide fixed
cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedGlobalVar.qll
Fixed
Show fixed
Hide fixed
cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedGlobalVar.qll
Fixed
Show fixed
Hide fixed
cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedGlobalVar.qll
Fixed
Show fixed
Hide fixed
cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedGlobalVar.qll
Fixed
Show fixed
Hide fixed
cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedGlobalVar.qll
Fixed
Show fixed
Hide fixed
| /** | ||
| * Represents the IR translation of a root element, either a function or a global variable. | ||
| */ |
Check warning
Code scanning / CodeQL
Class QLDoc style.
MathiasVP
left a comment
There was a problem hiding this comment.
Everything LGTM! Do we need to rerun DCA? I don't think much has changed apart from a merge-from-main and accepting some test changes, right?
|
I don't think we do... My only worry would be how much change there's been to main in the meantime, but there hasn't been much else happening on the C++ dataflow side |


Fixes a performance issue where all
IRVariables corresponding to a given global variable were being used in the initializer IRFunction for that global variable.