[PATCH] D157074: [clang][ExprConst] Add RHS source range to div by zero diags

2023-08-08 Thread Timm Bäder via Phabricator via cfe-commits
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:

[PATCH] D157074: [clang][ExprConst] Add RHS source range to div by zero diags

2023-08-07 Thread Corentin Jabot via Phabricator via cfe-commits
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

[PATCH] D157074: [clang][ExprConst] Add RHS source range to div by zero diags

2023-08-07 Thread Timm Bäder via Phabricator via cfe-commits
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

[PATCH] D157074: [clang][ExprConst] Add RHS source range to div by zero diags

2023-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D157074: [clang][ExprConst] Add RHS source range to div by zero diags

2023-08-04 Thread Timm Bäder via Phabricator via cfe-commits
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

[PATCH] D157074: [clang][ExprConst] Add RHS source range to div by zero diags

2023-08-04 Thread Timm Bäder via Phabricator via cfe-commits
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:

[PATCH] D157074: [clang][ExprConst] Add RHS source range to div by zero diags

2023-08-04 Thread Corentin Jabot via Phabricator via cfe-commits
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 `

[PATCH] D157074: [clang][ExprConst] Add RHS source range to div by zero diags

2023-08-04 Thread Timm Bäder via Phabricator via cfe-commits
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