llvm-project/clang/lib/StaticAnalyzer/Core
Jordan Rose ec44ac6a59 [analyzer] New option to not suppress null return paths if an argument is null.
Our one basic suppression heuristic is to assume that functions do not
usually return NULL. However, when one of the arguments is NULL it is
suddenly much more likely that NULL is a valid return value. In this case,
we don't suppress the report here, but we do attach /another/ visitor to
go find out if this NULL argument also comes from an inlined function's
error path.

This new behavior, controlled by the 'avoid-suppressing-null-argument-paths'
analyzer-config option, is turned off by default. Turning it on produced
two false positives and no new true positives when running over LLVM/Clang.

This is one of the possible refinements to our suppression heuristics.
<rdar://problem/12350829>

llvm-svn: 166941
2012-10-29 17:31:59 +00:00
..
APSIntType.cpp [analyzer] Rework both constraint managers to handle mixed-type comparisons. 2012-05-08 03:27:16 +00:00
AnalysisManager.cpp Have AnalyzerOptions::getBooleanOption() stick the matching config 2012-10-01 18:28:19 +00:00
AnalyzerOptions.cpp [analyzer] New option to not suppress null return paths if an argument is null. 2012-10-29 17:31:59 +00:00
BasicValueFactory.cpp [analyzer] Disallow creation of int vals with explicit bit width / signedness. 2012-09-01 17:39:24 +00:00
BlockCounter.cpp Cleanup various declarations of 'Stmt*' to be 'Stmt *', etc. in libAnalyzer and libStaticAnalyzer[*]. It was highly inconsistent, and very ugly to look at. 2011-08-12 23:37:29 +00:00
BugReporter.cpp Add comments for RemoveRedundantMsgs, rename it to removeRedundantMsgs() per Jordan's feedback. 2012-10-26 16:02:36 +00:00
BugReporterVisitors.cpp [analyzer] New option to not suppress null return paths if an argument is null. 2012-10-29 17:31:59 +00:00
CMakeLists.txt Remove ProgramState::getSymVal(). It was being misused by Checkers, 2012-09-07 22:31:01 +00:00
CallEvent.cpp [analyzer] Create a temporary region when accessing a struct rvalue. 2012-10-17 19:35:37 +00:00
Checker.cpp Reapply r149311 which I reverted by mistake. 2012-01-31 02:23:28 +00:00
CheckerContext.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
CheckerHelpers.cpp Split 'include/clang/StaticAnalyzer' into 'include/clang/StaticAnalyzer/Core' and 'include/clang/StaticAnalyzer/Checkers'. 2011-02-10 01:03:03 +00:00
CheckerManager.cpp [analyzer] Remove unneeded 'inlineCall' checker callback. 2012-10-13 05:05:13 +00:00
CheckerRegistry.cpp Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line. 2012-02-07 22:29:24 +00:00
ConstraintManager.cpp Remove unnecessary ASTContext& parameter from SymExpr::getType(). 2012-09-26 06:00:14 +00:00
CoreEngine.cpp [analyzer] Use cast<> instead of getAs<> for a CFGElement known to be a CFGStmt. 2012-09-07 19:48:09 +00:00
Environment.cpp [analyzer] When binding to a ParenExpr, bind to its inner expression instead. 2012-10-17 19:35:44 +00:00
ExplodedGraph.cpp [analyzer] Use the CallEnter node to get a value for tracked null arguments. 2012-10-29 17:31:53 +00:00
ExprEngine.cpp [analyzer] Handle 'SomeVar.SomeEnumConstant', which is legal in C++. 2012-10-23 23:59:08 +00:00
ExprEngineC.cpp [analyzer] Fix a crash PR13762. 2012-09-05 22:31:58 +00:00
ExprEngineCXX.cpp [analyzer] Assume 'new' never returns NULL if it could throw an exception. 2012-10-20 02:32:51 +00:00
ExprEngineCallAndReturn.cpp [analyzer] Adjust the return type of an inlined devirtualized method call. 2012-10-03 01:08:35 +00:00
ExprEngineObjC.cpp [analyzer] Allow ObjC ivar lvalues where the base is nil. 2012-10-01 19:07:22 +00:00
FunctionSummary.cpp [analyzer] Record the basic blocks covered by the analyzes run. 2012-04-03 02:05:47 +00:00
HTMLDiagnostics.cpp Split library clangRewrite into clangRewriteCore and clangRewriteFrontend. 2012-09-01 05:09:24 +00:00
Makefile
MemRegion.cpp Reapply "[analyzer] Treat fields of unions as having symbolic offsets." 2012-10-10 23:23:21 +00:00
PathDiagnostic.cpp [analyzer] New option to not suppress null return paths if an argument is null. 2012-10-29 17:31:59 +00:00
PlistDiagnostics.cpp [analyzer] Embed the analyzer version into the plist output. 2012-10-15 22:48:19 +00:00
ProgramState.cpp [analyzer] Make ProgramStateManager's SubEngine parameter optional. 2012-10-01 16:53:40 +00:00
RangeConstraintManager.cpp [analyzer] Make ProgramStateManager's SubEngine parameter optional. 2012-10-01 16:53:40 +00:00
RegionStore.cpp [analyzer] Push evalDynamicCast and evalDerivedToBase up to Store. 2012-10-03 01:08:32 +00:00
SValBuilder.cpp Rename 'getConjuredSymbol*' to 'conjureSymbol*'. 2012-08-22 06:26:06 +00:00
SVals.cpp [analyzer] Teach the analyzer about implicit initialization of statics 2012-09-17 19:13:56 +00:00
SimpleConstraintManager.cpp [analyzer] Make ProgramStateManager's SubEngine parameter optional. 2012-10-01 16:53:40 +00:00
SimpleConstraintManager.h [analyzer] Make ProgramStateManager's SubEngine parameter optional. 2012-10-01 16:53:40 +00:00
SimpleSValBuilder.cpp Remove unnecessary ASTContext& parameter from SymExpr::getType(). 2012-09-26 06:00:14 +00:00
Store.cpp [analyzer] Push evalDynamicCast and evalDerivedToBase up to Store. 2012-10-03 01:08:32 +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 Remove unnecessary ASTContext& parameter from SymExpr::getType(). 2012-09-26 06:00:14 +00:00
TextPathDiagnostics.cpp [analyzer] Ensure that PathDiagnostics profile the same regardless of path. 2012-08-31 00:36:26 +00:00