]> granicus.if.org Git - clang/commit
[analyzer] Highlight c_str() call in DanglingInternalBufferChecker.
authorReka Kovacs <rekanikolett@gmail.com>
Sat, 7 Jul 2018 19:27:18 +0000 (19:27 +0000)
committerReka Kovacs <rekanikolett@gmail.com>
Sat, 7 Jul 2018 19:27:18 +0000 (19:27 +0000)
commitffbe9fa4c0a662713e32ca276eaa5de60d5a777b
tree953b9bb2a4fc2c354dcdef38a183689b1d7f1719
parenta8cfadd9a957e1fdd6dd289c957e31dca395d5c8
[analyzer] Highlight c_str() call in DanglingInternalBufferChecker.

Add a bug visitor to DanglingInternalBufferChecker that places a note
at the point where the dangling pointer was obtained. The visitor is
handed over to MallocChecker and attached to the report there.

Differential Revision: https://reviews.llvm.org/D48522

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@336495 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/AllocationState.h
lib/StaticAnalyzer/Checkers/DanglingInternalBufferChecker.cpp
lib/StaticAnalyzer/Checkers/MallocChecker.cpp
test/Analysis/dangling-internal-buffer.cpp