9 Commits

Author SHA1 Message Date
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