]> granicus.if.org Git - clang/commit
[analyzer] Don't inline the [cd]tors of C++ iterators.
authorJordan Rose <jordan_rose@apple.com>
Wed, 1 May 2013 22:39:31 +0000 (22:39 +0000)
committerJordan Rose <jordan_rose@apple.com>
Wed, 1 May 2013 22:39:31 +0000 (22:39 +0000)
commit776d3bb65c90278b9c65544b235d2ac40aea1d6e
treea863579208c52904dcf426aeefce4f4cf451bf21
parenta3ae52b63aff9d4478084e40b1f683f45eb06ab7
[analyzer] Don't inline the [cd]tors of C++ iterators.

This goes with r178516, which instructed the analyzer not to inline the
constructors and destructors of C++ container classes. This goes a step
further and does the same thing for iterators, so that the analyzer won't
falsely decide we're trying to construct an iterator pointing to a
nonexistent element.

The heuristic for determining whether something is an iterator is the
presence of an 'iterator_category' member. This is controlled under the
same -analyzer-config option as container constructor/destructor inlining:
'c++-container-inlining'.

<rdar://problem/13770187>

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