We didn't call the function explicitly in a static_assert() statement and the checkPotentialConstantExpression() invocation quietly aborted early because of the missing initializer for A::a. Fix this by calling ignoredExprs() explicitly.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/AST/Interp/ByteCodeExprGen.cpp | ||
---|---|---|
533–534 | Is it ever legal to have an argument expr with side effects (in cases the constant expression interpreter needs to handle)? That's really the only reason I did it this way. |
Comment Actions
LGTM
clang/lib/AST/Interp/ByteCodeExprGen.cpp | ||
---|---|---|
533–534 | Ah, I see! No, I don't think it's possible to have an expression argument with side effects that's valid in a constant expression for these operators. |
For my own understanding -- why do we not need to call discard() on the operand expression?