shafik added inline comments.
Comment at: clang/lib/AST/Interp/Interp.cpp:101
+static bool CheckConstexpr(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
+ if (!S.inConstantContext())
Is `CheckConstexpr` descriptive enough? Would something like `CheckLoadI
tbaeder added a comment.
This is wrong if the (constant) initializer is for a legitimate non-constexpr
variable declaration. We do a load in `visitDecl()`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137563/new/
https://reviews.llvm.org/D137563
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.
Refering to non-constexpr variables in a constant e