]> granicus.if.org Git - clang/commit
[analyzer] Add support for more invalidating functions in InnerPointerChecker.
authorReka Kovacs <rekanikolett@gmail.com>
Mon, 30 Jul 2018 15:43:45 +0000 (15:43 +0000)
committerReka Kovacs <rekanikolett@gmail.com>
Mon, 30 Jul 2018 15:43:45 +0000 (15:43 +0000)
commitc4f64d0f6e92647c7c3fcab8614ffe7fe27ac23d
treeb19001b18501ef23bb02ce587138eb1e8d39eaa0
parent1b2dafb41e63b904e18ef700ad103be513100a66
[analyzer] Add support for more invalidating functions in InnerPointerChecker.

According to the standard, pointers referring to the elements of a
`basic_string` may be invalidated if they are used as an argument to
any standard library function taking a reference to non-const
`basic_string` as an argument. This patch makes InnerPointerChecker warn
for these cases.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338259 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp
lib/StaticAnalyzer/Checkers/MallocChecker.cpp
test/Analysis/inner-pointer.cpp