[PATCH] D149965: [clang][Interp] Fix tests for ignored expressions
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 8 09:18:01 PDT 2023
aaron.ballman added inline comments.
================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:593-594
+ if (DiscardResult)
+ return true;
+
----------------
For my own understanding -- why do we not need to call `discard()` on the operand expression?
================
Comment at: clang/test/AST/Interp/literals.cpp:207-208
+ }
+ /// FIXME: This is rejected because the parameter so sizeof() is not constant.
+ /// produce a proper diagnostic.
+ static_assert(IgnoredRejected() == 0, ""); // expected-error {{not an integral constant expression}} \
----------------
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149965/new/
https://reviews.llvm.org/D149965
More information about the cfe-commits
mailing list