tbaeder marked an inline comment as done.
tbaeder added inline comments.
================
Comment at: clang/lib/AST/Interp/Interp.cpp:550-554
+ if (isa<ParmVarDecl>(D)) {
+ S.FFDiag(E, diag::note_constexpr_function_param_value_unknown) << D;
+ S.Note(D->getLocation(), diag::note_declared_at) << D->getSourceRange();
+ return false;
+ }
----------------
aaron.ballman wrote:
> 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?
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156509/new/
https://reviews.llvm.org/D156509
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits