[all-commits] [llvm/llvm-project] 80ab82: [analyzer] Accept C library functions from the `st...
NagyDonat via All-commits
all-commits at lists.llvm.org
Tue Mar 12 05:51:35 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 80ab8234ac309418637488b97e0a62d8377b2ecf
https://github.com/llvm/llvm-project/commit/80ab8234ac309418637488b97e0a62d8377b2ecf
Author: NagyDonat <donat.nagy at ericsson.com>
Date: 2024-03-12 (Tue, 12 Mar 2024)
Changed paths:
M clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h
M clang/lib/StaticAnalyzer/Core/CheckerContext.cpp
M clang/unittests/StaticAnalyzer/CMakeLists.txt
A clang/unittests/StaticAnalyzer/IsCLibraryFunctionTest.cpp
M llvm/utils/gn/secondary/clang/unittests/StaticAnalyzer/BUILD.gn
Log Message:
-----------
[analyzer] Accept C library functions from the `std` namespace (#84469)
Previously, the function `isCLibraryFunction()` and logic relying on it
only accepted functions that are declared directly within a TU (i.e. not
in a namespace or a class). However C++ headers like <cstdlib> declare
many C standard library functions within the namespace `std`, so this
commit ensures that functions within the namespace `std` are also
accepted.
After this commit it will be possible to match functions like `malloc`
or `free` with `CallDescription::Mode::CLibrary`.
---------
Co-authored-by: Balazs Benics <benicsbalazs at gmail.com>
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