xbolva00 added a comment.

In https://reviews.llvm.org/D52750#1261746, @Rakete1111 wrote:

> Nah, you don't even need to call `EvaluateForOverflow` I believe. :) Have a 
> look overflow evaluation is done.


Well..

  if (!getLangOpts().CPlusPlus11 && E->isIntegerConstantExpr(Context)) {
    if (Result) {
      *Result = E->EvaluateKnownConstInt(Context); // here

}

and 
 char a[2147483642 * 3];

Result->getBitWidth() reports 32.  I don't know how to detect there if overflow 
or not :/ I have already spent some time to solve this, but still no good 
solution. Possibly I would abandon this patch.


https://reviews.llvm.org/D52750



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to