analyzer: handle C++ argument numbers and "this" [PR97116]
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 6 Oct 2020 21:59:07 +0000 (17:59 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 7 Oct 2020 13:39:37 +0000 (09:39 -0400)
commit2f7c50b7091c09d665aaf27173aacf34c9904e4c
treec6b83159151e44279b7b1c6c41d2d2deef7e252a
parent7345c89ecb1a31ce96c6789bffc7183268a040b3
analyzer: handle C++ argument numbers and "this" [PR97116]

gcc/analyzer/ChangeLog:
PR analyzer/97116
* sm-malloc.cc (method_p): New.
(describe_argument_index): New.
(inform_nonnull_attribute): Use describe_argument_index.
(possible_null_arg::describe_final_event): Likewise.
(null_arg::describe_final_event): Likewise.

gcc/testsuite/ChangeLog:
PR analyzer/97116
* g++.dg/analyzer/pr97116.C: New test.
gcc/analyzer/sm-malloc.cc
gcc/testsuite/g++.dg/analyzer/pr97116.C [new file with mode: 0644]