This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG74c141a467ca: [clang][ExprConst] Add RHS source range to div
by zero diags (authored by tbaeder).
Changed prior to commit:
cor3ntin accepted this revision.
cor3ntin added a comment.
This revision is now accepted and ready to land.
Thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157074/new/
https://reviews.llvm.org/D157074
___
cfe-commits mailing list
tbaeder updated this revision to Diff 547660.
tbaeder marked an inline comment as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157074/new/
https://reviews.llvm.org/D157074
Files:
clang/lib/AST/ExprConstant.cpp
clang/lib/AST/Interp/Interp.h
aaron.ballman added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:2811-2813
+static bool handleIntIntBinOp(EvalInfo , const BinaryOperator *E,
+ const APSInt , BinaryOperatorKind Opcode,
+ APSInt RHS, APSInt
tbaeder marked an inline comment as done.
tbaeder added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:2835
if (RHS == 0) {
- Info.FFDiag(E, diag::note_expr_divide_by_zero);
+ Info.FFDiag(E, diag::note_expr_divide_by_zero) << RHSRange;
return
tbaeder updated this revision to Diff 547145.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157074/new/
https://reviews.llvm.org/D157074
Files:
clang/lib/AST/ExprConstant.cpp
clang/lib/AST/Interp/Interp.h
clang/test/Misc/constexpr-source-ranges.cpp
Index:
cor3ntin added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:2835
if (RHS == 0) {
- Info.FFDiag(E, diag::note_expr_divide_by_zero);
+ Info.FFDiag(E, diag::note_expr_divide_by_zero) << RHSRange;
return false;
Why not just use `
tbaeder created this revision.
tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin, hazohelet.
Herald added a project: All.
tbaeder requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo