]> granicus.if.org Git - clang/commit
[analyzer] Silence warnings coming from allocators used by std::basic_string.
authorJordan Rose <jordan_rose@apple.com>
Fri, 15 Nov 2013 02:11:19 +0000 (02:11 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 15 Nov 2013 02:11:19 +0000 (02:11 +0000)
commitfda9dbf1f4d15baaedffdd4b4bb529e06172f73d
tree9c72b3aa23175b67541381ca5c210b1670d9805a
parentd0e5f6a39e4fb30b3a217ae91aecc167a94022e6
[analyzer] Silence warnings coming from allocators used by std::basic_string.

This is similar to r194004: because we can't reason about the data structure
invariants of std::basic_string, the analyzer decides it's possible for an
allocator to be used to deallocate the string's inline storage. Just ignore
this by walking up the stack, skipping past methods in classes with
"allocator" in the name, and seeing if we reach std::basic_string that way.

PR17866

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194764 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
test/Analysis/Inputs/system-header-simulator-cxx.h
test/Analysis/inlining/stl.cpp