ninja clang clangd
Details
Diff Detail
Event Timeline
There are some uses of static_cast<std::underlying_type_t<ConstexprSpecKind>>() that I'm not certain really need that much complexity given that I doubt we'd ever change the underlying type of the enumeration away from being an int (or something which promotes to int). Do you think using underlying_type_t adds some extra value I'm not seeing? We seem to go both ways in this patch and should be consistent -- my weak preference is to cast to int for brevity and to reduce the template instantiation work when compiling Clang, but I don't insist.
clang/include/clang/Basic/Specifiers.h | ||
---|---|---|
32 | I think the names should probably have consistent internal casing -- the keywords are constexpr, consteval, and constinit, so it's a bit weird to have Constexpr and ConstInit. How about changing ConstEval and ConstInit to Consteval and Constinit? | |
clang/lib/Sema/SemaDecl.cpp | ||
7133 | This one uses int but others use underlying_type_t | |
9119–9122 | This one uses int but others use underlying_type_t. |
Thank you for the patch, I've commit on your behalf in 41b65f166b51760f77d0f9e465b3858f46e101f0
I think the names should probably have consistent internal casing -- the keywords are constexpr, consteval, and constinit, so it's a bit weird to have Constexpr and ConstInit. How about changing ConstEval and ConstInit to Consteval and Constinit?