[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 19 22:33:10 PDT 2022
shafik added inline comments.
================
Comment at: clang/include/clang/AST/Decl.h:3834
+ void getValueRange(llvm::APInt &Max, llvm::APInt &Min) const;
+
----------------
I should add a documenting comment.
================
Comment at: clang/include/clang/Basic/DiagnosticASTKinds.td:370
+def note_constexpr_unscoped_enum_out_of_range : Note<
+ "store of value outside of the range of unscoped enum, valid values %0 to %1">;
def err_experimental_clang_interp_failed : Error<
----------------
erichkeane wrote:
> This is a bit awkwardly phrased to me... though I don't have a better idea. Perhaps take another run, or get Aaron to look at it?
@aaron.ballman I would appreciate help with better wording on this.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130058/new/
https://reviews.llvm.org/D130058
More information about the cfe-commits
mailing list