diff options
author | Siddhesh Poyarekar <siddhesh@gotplt.org> | 2021-07-28 15:43:47 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@gotplt.org> | 2021-07-28 17:43:26 +0530 |
commit | 31534ac26e0ec1deeb648b2548dbbe17574ea78c (patch) | |
tree | 67774fc3af199a51173eb4f0f477bfb6181b5c3c /gcc/fortran/expr.c | |
parent | 84606efb0c6b1c1598d5ec6b05544e71596663b5 (diff) | |
download | gcc-31534ac26e0ec1deeb648b2548dbbe17574ea78c.zip gcc-31534ac26e0ec1deeb648b2548dbbe17574ea78c.tar.gz gcc-31534ac26e0ec1deeb648b2548dbbe17574ea78c.tar.bz2 |
analyzer: Handle strdup builtins
Consolidate allocator builtin handling and add support for
__builtin_strdup and __builtin_strndup.
gcc/analyzer/ChangeLog:
* analyzer.cc (is_named_call_p, is_std_named_call_p): Make
first argument a const_tree.
* analyzer.h (is_named_call_p, -s_std_named_call_p): Likewise.
* sm-malloc.cc (known_allocator_p): New function.
(malloc_state_machine::on_stmt): Use it.
gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/strdup-1.c (test_4, test_5, test_6): New
tests.
Diffstat (limited to 'gcc/fortran/expr.c')
0 files changed, 0 insertions, 0 deletions