Timm Baeder
32ba045bea
[clang][bytecode] Fix comparing pointers to union members ( #154342 )
...
If one of them is a one-past-end pointer.
2025-08-20 07:09:20 +02:00
Timm Baeder
dc7c3c2b2b
[clang][bytecode] Disable location tracking for implicit field inits ( #150190 )
2025-08-05 13:14:01 +02:00
Timm Baeder
23eef9a7c4
[clang][bytecode] Activate primitive fields before initializing them ( #149963 )
...
The initializer itself might need the field to be active.
2025-07-23 06:09:27 +02:00
Timm Baeder
01b47eb86c
[clang][bytecode] Only implicitly start lifetime of trivially-default-constructible union members ( #149835 )
...
See
faee39baa8
2025-07-23 05:28:37 +02:00
Timm Baeder
3bb4355bb8
[clang][bytecode] Report mutable reads when copying unions ( #149320 )
2025-07-18 11:10:57 +02:00
Timm Baeder
17d3029331
[clang][bytecode] Make union activation more granular ( #148835 )
...
Only activate things if the syntactical structure suggests so. This adds
a bunch of new opcodes to control whether to activate in stores, etc.
Fixes #134789
2025-07-16 09:03:33 +02:00
Timm Baeder
db4e927f9f
[clang][bytecode] Misc union fixes ( #146824 )
...
First, don't forget to also activate fields which are bitfields on
assignment.
Second, when deactivating fields, recurse into records.
2025-07-06 14:55:29 +02:00
Timm Baeder
258c048f64
[clang][bytecode] Fix copy constructors for empty unions ( #147050 )
...
Nothing to do in that case.
2025-07-04 16:10:12 +02:00
Timm Baeder
980d027a3f
[clang][bytecode] Allow This pointers in CPCE mode ( #137761 )
...
The outermost function doesn't have a This pointers, but inner calls
can. This still doesn't match the diagnostic output of the current
interpreter properly, but it's closer I think.
2025-04-29 10:14:15 +02:00
Timm Baeder
7267dbfe10
[clang][bytecode] Fix comparing the addresses of union members ( #133852 )
...
Union members get the same address, so we can't just use
`Pointer::getByteOffset()`.
2025-04-01 09:00:46 +02:00
Timm Baeder
49f06075a6
[clang][bytecode] Fix union copy/move operator active check ( #132238 )
...
Don't call CheckActive for copy/move operators. They will activate the
union member.
2025-03-20 19:08:55 +01:00
Timm Baeder
ca1bde0b91
[clang][bytecode] Check dtor instance pointers for active-ness ( #128732 )
...
And diagnose if we're trying to destroy an inactive member of a union.
2025-03-17 19:01:35 +01:00
Timm Baeder
1d8eb436ca
[clang][bytecode] Diagnose member calls on inactive union fields ( #129709 )
...
Unless the function is a constructor, which is allowed to do this since
it will activate the member.
2025-03-04 16:14:47 +01:00
Timm Baeder
dff2ca424c
[clang][bytecode] Add special case for anonymous unions ( #128681 )
...
This fixes the expected output to match the one of the current
interpreter.
2025-02-25 12:46:06 +01:00
Timm Baeder
7ef636e1c4
[clang][bytecode] Mark IndirectFieldDecl chain links as initialized ( #125869 )
...
We only initialize the final field above, so make sure we're marking the
links in the chain on the way there as initialized as well.
2025-02-05 17:50:55 +01:00
Timm Baeder
707e2b83a5
[clang][bytecode] Handle union move assignment operators as well ( #125516 )
2025-02-03 17:43:32 +01:00
Timm Baeder
21a8c920fe
[clang][bytecode] Add special handling for union copy assign operators ( #125476 )
2025-02-03 12:41:49 +01:00
Timm Baeder
ac857f9bdd
[clang][bytecode] Change the way we do init chains ( #122871 )
...
See the comment in Compiler<>::VisitCXXThisExpr.
We need to mark the InitList explicitly, so we later know what to refer
to when the init chain is active.
2025-01-14 10:57:36 +01:00
Timm Baeder
df11ee213e
[clang][bytecode] Diagnose member calls on deleted blocks ( #106529 )
...
This requires a bit of restructuring of ctor calls when checking for a
potential constant expression.
2024-08-29 15:22:59 +02:00
Timm Baeder
a07aba5d44
[clang] Rename all AST/Interp stuff to AST/ByteCode ( #104552 )
...
"Interp" clashes with the clang interpreter and people often confuse
this.
2024-08-16 17:13:12 +02:00