[clang] [clang][Interp] Integral pointers (PR #84159)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 25 06:20:44 PDT 2024


Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>,
Timm =?utf-8?q?B=C3=A4der?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/84159 at github.com>


================
@@ -1912,6 +1929,10 @@ inline bool NoRet(InterpState &S, CodePtr OpPC) {
 
 inline bool NarrowPtr(InterpState &S, CodePtr OpPC) {
   const Pointer &Ptr = S.Stk.pop<Pointer>();
+  if (!S.getLangOpts().CPlusPlus) {
+    S.Stk.push<Pointer>(Ptr);
----------------
AaronBallman wrote:

Still think a comment here would be helpful

https://github.com/llvm/llvm-project/pull/84159


More information about the cfe-commits mailing list