[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 1 15:17:29 PDT 2018


rsmith added a comment.

This is still evaluating the expression twice. To evaluate it only once, you'll need to sink the checks into `Sema::VerifyIntegerConstantExpression`'s call to `EvaluateKnownConstInt`. (That should also remove the redundant diagnostics noise in the language modes where signed overflow renders an expression non-constant.)


https://reviews.llvm.org/D52750





More information about the cfe-commits mailing list