[PATCH] D132111: [clang][Interp] Implement pointer (de)ref operations and DeclRefExprs
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 18 03:18:59 PDT 2022
tbaeder added inline comments.
================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:649
+ return DiscardResult ? this->emitPop(T, E) : true;
+ });
case UO_Not: // ~x
----------------
Handling the deref like this breaks assigning, e.g. `int m = 10; int *p = &m; *p = 12;` doesn't work. The LHS of the assignment ends up being `*p`, so just an int.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132111/new/
https://reviews.llvm.org/D132111
More information about the cfe-commits
mailing list