================
@@ -50,6 +101,44 @@ class BuiltinFunctionChecker : public Checker<eval::Call> {
} // namespace
+void BuiltinFunctionChecker::HandleOverflowBuiltin(const CallEvent &Call,
+ CheckerContext &C,
+ BinaryOperator::Opcode Op,
+ QualType ResultType) const {
+ // All __builtin_*_overflow functions take 3 argumets.
+ assert(Call.getNumArgs() == 3);
----------------
NagyDonat wrote:
> I've tried to catch this assert locally by calling __builtin_*_overflow with
> 2 arguments, but clang just rejects it.
Oh, I see. Perhaps add a comment saying that "Calling a builtin with an
incorrect argument count produces compiler error (...)", because e.g. I didn't
know that this is the case.
https://github.com/llvm/llvm-project/pull/102602
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits