Fixes #64195
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/AST/Interp/Interp.cpp | ||
---|---|---|
551–555 | No need for this given all code paths return false. However, what should we do for calls to this for something other than a ParmVarDecl? Should we issue a generic note so the constant expression fails but we get notified to the missing cases? | |
clang/test/AST/Interp/functions.cpp | ||
316–323 | I'd like another test along the lines of: consteval void param(bool b) { static_assert(b); // Same error despite this being a consteval function where `b`'s value is always going to be known at compile time } |
clang/lib/AST/Interp/Interp.cpp | ||
---|---|---|
551–555 | I think the return false; is basically fine, it will show the usual "is not an integral constant expression" error message, and if there's no other note, we can investigate and improve diagnostics. |
No need for this given all code paths return false.
However, what should we do for calls to this for something other than a ParmVarDecl? Should we issue a generic note so the constant expression fails but we get notified to the missing cases?