This is an archive of the discontinued LLVM Phabricator instance.

Extend the number of case Sema::CheckForIntOverflow covers
ClosedPublic

Authored by shafik on Nov 12 2022, 12:48 PM.

Details

Summary

Currently Sema::CheckForIntOverflow misses several case that other compilers diagnose for overflow in integral constant expressions. This includes the arguments of a CXXConstructExpr as well as the expressions used in an ArraySubscriptExpr, CXXNewExpr and CompoundLiteralExpr.

This fixes https://github.com/llvm/llvm-project/issues/58944

Diff Detail

Event Timeline

shafik created this revision.Nov 12 2022, 12:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 12 2022, 12:48 PM
shafik requested review of this revision.Nov 12 2022, 12:48 PM
shafik updated this revision to Diff 474981.Nov 12 2022, 10:23 PM

Fix formatting of test

It looks like conditional_callbacks.c has been failing every once and while before this change. I can't seem to track down when it started yet.

erichkeane accepted this revision.Nov 15 2022, 7:54 AM
This revision is now accepted and ready to land.Nov 15 2022, 7:54 AM
shafik updated this revision to Diff 475528.Nov 15 2022, 11:03 AM

Add Release note.

Herald added a project: Restricted Project. · View Herald TranscriptNov 15 2022, 12:07 PM