hazohelet added inline comments.

================
Comment at: clang/lib/AST/Interp/Interp.h:530-535
   if (S.checkingForUndefinedBehavior()) {
     SmallString<32> Trunc;
     APResult.trunc(Result.bitWidth()).toString(Trunc, 10);
     auto Loc = E->getExprLoc();
-    S.report(Loc, diag::warn_integer_constant_overflow) << Trunc << Type;
+    S.report(Loc, diag::warn_integer_constant_overflow)
+        << Trunc << Type << E->getSourceRange();
----------------
I'm not sure whether this branch takes effect.
I could not find codes that takes this block, so I haven't added tests for this.

FWIW, the old interpreter does not have the corresponding 
`warn_integer_constant_overflow` generated against overflowing increments.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157383/new/

https://reviews.llvm.org/D157383

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

Reply via email to