tbaeder abandoned this revision.
tbaeder added a comment.
I've already abandoned this locally, pretty sure I'll end up taking another
approach.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137706/new/
https://reviews.llvm.org/D137706
___
tbaeder added a comment.
Note that according to
https://clang.llvm.org/docs/ConstantInterpreter.html#pointers, such pointers
had their own pointer type (`TargetPointer`), so I'm not sure if the approach
here is the right one.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137706/new/
shafik added a comment.
I agree with @aaron.ballman I expect some more tests for this.
Comment at: clang/lib/AST/Interp/Pointer.h:70
Pointer(Block *B, unsigned BaseAndOffset);
+ Pointer(unsigned Offset);
Pointer(const Pointer );
Is the only cast we have
aaron.ballman added a comment.
I'd expect more test coverage for these changes. Like a C-style cast and a
reinterpret_cast in C++ code
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137706/new/
https://reviews.llvm.org/D137706
___
tbaeder updated this revision to Diff 474930.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137706/new/
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
tbaeder updated this revision to Diff 474929.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137706/new/
https://reviews.llvm.org/D137706
Files:
clang/lib/AST/ExprConstant.cpp
clang/test/SemaCXX/builtins.cpp
clang/test/SemaCXX/constant-expression-cxx11.cpp
tbaeder updated this revision to Diff 474459.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137706/new/
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
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:188-192
+// == in C
+if (const auto *BOP = dyn_cast(SubExpr);
+BOP && BOP->isEqualityOp())
+ return this->visit(SubExpr);
+[[fallthrough]];
This is a
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