We need to do this, even for global variables (it seems).
The diagnostic output is slightly different than what we get from the current interpreter, but I'm not sure if it's worse or not or if that needs to be changed.
Paths
| Differential D136694
[clang][Interp] Check that constructor calls initialize all record fields ClosedPublic Authored by tbaeder on Oct 25 2022, 9:08 AM.
Details Summary We need to do this, even for global variables (it seems). The diagnostic output is slightly different than what we get from the current interpreter, but I'm not sure if it's worse or not or if that needs to be changed.
Diff Detail Event TimelineComment Actions It's worth noting that there are core issues in this area: https://wg21.link/cwg2558 and https://wg21.link/cwg2536 and they're not yet resolved.
tbaeder marked an inline comment as done.
tbaeder added a child revision: D136936: [clang][Interp] Handle undefined functions better.Oct 28 2022, 6:15 AM tbaeder added a child revision: D134859: [clang][Interp] Implement basic support for floating point values.Oct 28 2022, 8:38 AM tbaeder added inline comments. tbaeder marked 2 inline comments as done. This revision is now accepted and ready to land.Dec 1 2022, 8:25 AM Comment Actions Oh I think this patch is doing too much. The checking should only occur for global variables. This revision was landed with ongoing or failed builds.Jan 19 2023, 12:42 AM Closed by commit rG6b0cd497b0fb: [clang][Interp] Check Field initialization after constructor call (authored by tbaeder). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 471161 clang/lib/AST/Interp/Descriptor.cpp
clang/lib/AST/Interp/Interp.h
clang/lib/AST/Interp/Interp.cpp
clang/lib/AST/Interp/InterpFrame.cpp
clang/test/AST/Interp/cxx20.cpp
clang/test/AST/Interp/records.cpp
|
Should we assert that ThisPtr is valid?