[PATCH] D137706: [clang][Interp] Implement IntegralToPointer casts
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 9 04:59:47 PST 2022
tbaeder created this revision.
tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik.
Herald added a subscriber: inglorion.
Herald added a project: All.
tbaeder requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
The pointers created through such a cast are not usable in a constant expression as far as I know, but we need to be able to express them. Do that via a `Pointer` with a `nullptr` pointee and an `Offset` that is the given integer.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137706
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/Interp.h
clang/lib/AST/Interp/Opcodes.td
clang/lib/AST/Interp/Pointer.cpp
clang/lib/AST/Interp/Pointer.h
clang/test/Sema/const-eval-64.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137706.474230.patch
Type: text/x-patch
Size: 6363 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221109/617a3640/attachment-0001.bin>
More information about the cfe-commits
mailing list