Timm Baeder
c869ef6ebc
[clang][bytecode] Refactor Check* functions ( #152300 )
...
... so we don't have to create Pointer instances when we don't need
them.
2025-08-07 11:32:39 +02:00
Timm Baeder
90d1d23507
[clang][bytecode] Overrride locs for certain CXXConstructExprs ( #152185 )
...
Do it only if we will end up skipping the initializer anyway because
it's a trivial copy or move constructor.
2025-08-06 09:07:40 +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
3bb4355bb8
[clang][bytecode] Report mutable reads when copying unions ( #149320 )
2025-07-18 11:10:57 +02:00
Kazu Hirata
c9cdc33dd6
[clang] Remove unused includes (NFC) ( #146254 )
...
These are identified by misc-include-cleaner. I've filtered out those
that break builds. Also, I'm staying away from llvm-config.h,
config.h, and Compiler.h, which likely cause platform- or
compiler-specific build failures.
2025-06-28 20:41:46 -07:00
Timm Baeder
79eed76c58
[clang][bytecode][NFC] Remove incorrect comment ( #139571 )
...
We don't create function frames for builtin functions anymore.
2025-05-13 08:09:26 +02:00
Timm Baeder
4258998654
[clang][bytecode] Only print ptr/reference types via toAPValue() ( #137965 )
...
Otherwise, convert them to an RValue to print them. This fixes the
printing of e.g. complex values.
2025-05-01 06:04:59 +02:00
Timm Baeder
959905a5ad
[clang][bytecode] Don't create Function instances for builtins ( #137618 )
...
Now that we don't use them anymore in InterpBuiltin.cpp and we don't
create frames for them anymore anyway, just don't create Function
instances.
2025-04-28 14:08:42 +02:00
Timm Baeder
16c721f2d1
[clang][bytecode] Destroy local variables in reverse order ( #125727 )
...
See the attached test case.
2025-02-05 08:09:13 +01:00
Timm Baeder
06130ed341
Reapply "[clang][bytecode] Stack-allocate bottom function frame" (#12… ( #125349 )
...
…5325)
Move the BottomFrame to InterpState instead.
2025-02-01 18:12:35 +01:00
Jorge Gorbe Moya
386af4a5c6
Revert "[clang][bytecode] Stack-allocate bottom function frame" ( #125325 )
...
Reverts llvm/llvm-project#125253
It introduced an msan failure. Caught by a buildbot here:
https://lab.llvm.org/buildbot/#/builders/164/builds/6922/steps/17/logs/stdio
2025-01-31 20:09:14 -08:00
Timm Baeder
f3549814f8
[clang][bytecode] Stack-allocate bottom function frame ( #125253 )
...
Instead of heap-allocating it. This is similar to what the current
interpeter does. In C, we have no function calls, so the extra heap
allocation never makes sense.
2025-01-31 20:08:58 +01:00
Timm Baeder
3c8dfce3de
[clang][bytecode][NFC] Use RetPC in InterpFrame::getExpr() as well ( #125200 )
...
Both getLocation() and getRange() use the RetPC if the current function
doesn't have a usable body. Using PC here was just a typo.
2025-01-31 12:54:42 +01:00
Timm Baeder
ceaf6e912a
[clang][bytecode] Support ImplicitValueInitExpr for multi-dim arrays ( #117312 )
...
The attached test case from
https://github.com/llvm/llvm-project/issues/117294 used to cause an
assertion because we called classifPrim() on an array type.
The new result doesn't crash but isn't exactly perfect either. Since the
problem arises when evaluating an ImplicitValueInitExpr, we have no
proper source location to point to. Point to the caller instead.
2024-11-25 12:15:31 +01:00
Timm Baeder
4b96400240
[clang][bytecode] Allow placement-new in std functions pre-C++26 ( #109753 )
2024-09-24 10:28:54 +02:00
Timm Baeder
898fd396b8
[clang][bytecode] Check allocation size limit for operator new ( #109590 )
2024-09-23 09:59:41 +02:00
Timm Baeder
d03822d888
[clang][bytecode] Fix lookup of source locations in implicit ctors ( #107992 )
...
Implicit functions may still have a body. The !hasBody() check is
enough.
2024-09-11 07:21:49 +02:00
Timm Baeder
83fea8b809
[clang][bytecode] Allow continuing when discarded MemberExpr Base fails ( #107231 )
...
We don't need the value in this case, since we're discarding it anyway.
Allow continuing the interpretation but note the side effect.
2024-09-07 09:33:27 +02:00
Timm Baeder
733a92d7bc
[clang][bytecode] Print Pointers via APValue ( #107056 )
...
Instead of doing this ourselves, just rely on printing the APValue.
2024-09-03 11:07:19 +02:00
yronglin
d9e7286019
[NFC][clang][bytecode] Rename clang::interp::State::getCtx to clang::interp::State::getASTContext ( #106071 )
...
The new constant interpreter's `clang::interp::InterpState` contains
both `clang::interp::Context` and `clang::ASTContext`. So using `S.Ctx`
and `S.getCtx()` was a bit confusing. This PR rename `getCtx()` to
`getASTContext` to make things more clearer.
Signed-off-by: yronglin <yronglin777@gmail.com>
2024-08-26 22:23:07 +08: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