forked from swiftlang/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Clang] Diagnose undefined behavior in a constant expression while ev…
…aluating a compound assignment with remainder as operand Currently we don't diagnose overflow in a constant expression for the case of compound assignment with remainder as a operand. In handleIntIntBinOp the arguments LHS and Result can be the same source but in the check for remainder in this function we assigned to Result before checking for overflow. In all the other operations the check is done before Result is assigned to. Differential Revision: https://reviews.llvm.org/D140455
- Loading branch information
Showing
3 changed files
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters