llvm-project/clang/lib/StaticAnalyzer/Core
Anna Zaks b8de0c4278 Do not inline methods of C++ containers (coming from headers).
This silences false positives (leaks, use of uninitialized value) in simple
code that uses containers such as std::vector and std::list. The analyzer
cannot reason about the internal invariances of those data structures which
leads to false positives. Until we come up with a better solution to that
problem, let's just not inline the methods of the containers and allow objects
to escape whenever such methods are called.

This just extends an already existing flag "c++-container-inlining" and applies
the heuristic not only to constructors and destructors of the containers, but
to all of their methods.

We have a bunch of distinct user reports all related to this issue
(radar://16058651, radar://16580751, radar://16384286, radar://16795491
[PR19637]).

llvm-svn: 211832
2014-06-27 01:03:05 +00:00
..
APSIntType.cpp [analyzer] Teach constraint managers about unsigned comparisons. 2013-03-23 01:21:33 +00:00
AnalysisManager.cpp Add configuration plumbing to enable static initializer branching in the CFG for the analyzer. 2013-03-29 00:09:22 +00:00
AnalyzerOptions.cpp Do not inline methods of C++ containers (coming from headers). 2014-06-27 01:03:05 +00:00
BasicValueFactory.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
BlockCounter.cpp [C++11] Simplify compare operators with std::tie. 2014-03-03 20:26:46 +00:00
BugReporter.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
BugReporterVisitors.cpp Don't assume an implicit IntrusiveRefCntPtr -> bool operator. 2014-06-03 05:04:52 +00:00
CMakeLists.txt [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
CallEvent.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
Checker.cpp [analyzer] Improved checker naming in CFG dump. 2014-02-17 18:25:34 +00:00
CheckerContext.cpp Cleanup handling of UniqueExternalLinkage. 2013-05-13 00:12:11 +00:00
CheckerHelpers.cpp
CheckerManager.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
CheckerRegistry.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
CommonBugCategories.cpp [analyzer] Replace bug category magic strings with shared constants, take 2. 2013-10-04 00:25:24 +00:00
ConstraintManager.cpp [analyzer] Let ConstraintManager subclasses provide a more efficient checkNull. 2012-10-31 16:44:55 +00:00
CoreEngine.cpp [analyzer] Don't create new PostStmt nodes if we don't have to. 2014-06-18 19:23:30 +00:00
Environment.cpp Removing an "if (this == nullptr)" check from two print methods. The condition 2014-06-09 22:53:25 +00:00
ExplodedGraph.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
ExprEngine.cpp [OPENMP] Initial parsing and sema analysis for 'single' directive. 2014-06-26 12:05:45 +00:00
ExprEngineC.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
ExprEngineCXX.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
ExprEngineCallAndReturn.cpp Do not inline methods of C++ containers (coming from headers). 2014-06-27 01:03:05 +00:00
ExprEngineObjC.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
FunctionSummary.cpp [analyzer] Use inline storage in the FunctionSummary DenseMap. 2013-04-02 00:26:26 +00:00
HTMLDiagnostics.cpp One of our buildbot for FreeBSD does not support std::to_string. 2014-06-14 09:28:27 +00:00
Makefile
MemRegion.cpp Removing an "if (this == nullptr)" check from two print methods. The condition 2014-06-09 22:53:25 +00:00
PathDiagnostic.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
PlistDiagnostics.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
PrettyStackTraceLocationContext.h [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-15 04:29:04 +00:00
ProgramState.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
RangeConstraintManager.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
RegionStore.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
SValBuilder.cpp [analyzer] Always use 'bool' as the SValBuilder condition type in C++. 2013-12-19 22:32:39 +00:00
SVals.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
SimpleConstraintManager.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
SimpleConstraintManager.h [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-15 04:29:04 +00:00
SimpleSValBuilder.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
Store.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
SubEngine.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
SymbolManager.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00