Mordante marked 3 inline comments as done.
Mordante added inline comments.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:10317-10320
IntRange L =
GetExprRange(C, CO->getTrueExpr(), MaxWidth, InConstantContext);
IntRange R =
GetExprRange(C, CO->getFalseExpr(), MaxWidth, InConstantContext);
----------------
rsmith wrote:
> It seems to me that the bug is here. `GetExprRange` is documented as
> "Pseudo-evaluate the given **integer** expression", but the true and false
> expressions here might not be integer expressions -- specifically, one of
> them could be of type `void` if it's a //throw-expression//. In that case, we
> should only call `GetExprRange` on the other expression. The expression range
> of the `void`-typed expression is irrelevant in this case, because that
> expression never returns.
Thanks for the hint I'll look into this solution.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85601/new/
https://reviews.llvm.org/D85601
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits