[PATCH] D135858: [clang][Interp] Support pointer arithmethic in binary operators

2022-10-16 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:970 + if (!Pointer::hasSameArray(LHS, RHS)) { +// TODO: Diagnose. +return false; This is also not being diagnosed (only rejected) by the current interpreter. But would be nice to h

[PATCH] D135858: [clang][Interp] Support pointer arithmethic in binary operators

2022-10-16 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 468060. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135858/new/ https://reviews.llvm.org/D135858 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/Interp.h clang/lib/AST/Interp/Opcod

[PATCH] D135858: [clang][Interp] Support pointer arithmethic in binary operators

2022-10-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 468058. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135858/new/ https://reviews.llvm.org/D135858 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/Interp.h clang/lib/AST/Interp/Opcod

[PATCH] D135858: [clang][Interp] Support pointer arithmethic in binary operators

2022-10-14 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:241 + // Pointer arithmethic special case. This is supported for one of + // LHS and RHS being a pointer type and the other being an integer type. + if (BO->getType()->isPointerType()) { --

[PATCH] D135858: [clang][Interp] Support pointer arithmethic in binary operators

2022-10-13 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:241 + // Pointer arithmethic special case. This is supported for one of + // LHS and RHS being a pointer type and the other being an integer type. + if (BO->getType()->isPointerType()) { ---

[PATCH] D135858: [clang][Interp] Support pointer arithmethic in binary operators

2022-10-13 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://revi