[PATCH] D81420: Fix size for _ExtInt types with builtins
Mott, Jeffrey T via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 9 09:19:40 PDT 2020
jtmott-intel marked 2 inline comments as done.
jtmott-intel added inline comments.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:1747-1748
break;
case Builtin::BI__builtin_add_overflow:
case Builtin::BI__builtin_sub_overflow:
case Builtin::BI__builtin_mul_overflow:
----------------
lebedev.ri wrote:
> I don't think this applies to `add`/`sub`: https://godbolt.org/z/Dj3GLP (or at least not all of them?)
> OTOH this does apply to plain division/remainder: https://godbolt.org/z/SXNw8H
Correct. I passed the `BuiltinID` so that in `SemaBuiltinOverflow` I could check for `mul` specifically. Alternatively, I could give `mul` its own case "block" separate from `add`/`sub`. Thoughts/preferences?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81420/new/
https://reviews.llvm.org/D81420
More information about the cfe-commits
mailing list