Files
clang-p2996/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp
Pavel Skripkin fba6c887c1 [analyzer] Fix wrong builtin_*_overflow return type (#111253)
`builtin_*_overflow` functions return `_Bool` according to [1].
`BuiltinFunctionChecker` was using `makeTruthVal` w/o specifying
explicit type, which creates an `int` value, since it's the type of any
compassion according to C standard.

Fix it by directly passing `BoolTy` to `makeTruthVal`

Closes: #111147

[1]
https://clang.llvm.org/docs/LanguageExtensions.html#checked-arithmetic-builtins
2024-10-05 17:21:31 +02:00

13 KiB