[all-commits] [llvm/llvm-project] fba6c8: [analyzer] Fix wrong `builtin_*_overflow` return t...
Pavel Skripkin via All-commits
all-commits at lists.llvm.org
Sat Oct 5 08:21:53 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fba6c887c110a501b311f6b01721eaf3a5dd994e
https://github.com/llvm/llvm-project/commit/fba6c887c110a501b311f6b01721eaf3a5dd994e
Author: Pavel Skripkin <paskripkin at gmail.com>
Date: 2024-10-05 (Sat, 05 Oct 2024)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp
M clang/test/Analysis/builtin_overflow.c
Log Message:
-----------
[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
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list