llvm-project/clang/lib/StaticAnalyzer/Checkers
Devin Coughlin 77942db0b8 [analyzer] Nullability: Don't warn along paths where null returned from non-null.
Change the nullability checker to not warn along paths where null is returned from
a method with a non-null return type, even when the diagnostic for this return
has been suppressed. This prevents warning from methods with non-null return types
that inline methods that themselves return nil but that suppressed the diagnostic.

Also change the PreconditionViolated state component to be called "InvariantViolated"
because it is set when a post-condition is violated, as well.

rdar://problem/25393539

llvm-svn: 264647
2016-03-28 20:30:25 +00:00
..
AllocationDiagnostics.cpp
AllocationDiagnostics.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
AnalyzerStatsChecker.cpp Avoid overly large SmallPtrSet/SmallSet 2016-01-30 01:27:06 +00:00
ArrayBoundChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
ArrayBoundCheckerV2.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 19:38:18 +00:00
BasicObjCFoundationChecks.cpp Fix some Clang-tidy readability-redundant-control-flow warnings; other minor fixes. 2016-02-10 19:11:58 +00:00
BoolAssignmentChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
BuiltinFunctionChecker.cpp add __builtin_unpredictable and convert to metadata 2015-09-02 20:01:30 +00:00
CMakeLists.txt [analyzer] Detect duplicate [super dealloc] calls 2016-02-22 17:56:24 +00:00
CStringChecker.cpp [analyzer] Invalidate destination of std::copy() and std::copy_backward(). 2016-02-07 16:55:44 +00:00
CStringSyntaxChecker.cpp Rewrite users of Stmt::child_begin/end into for-range loops. 2015-07-03 15:12:24 +00:00
CallAndMessageChecker.cpp [analyzer] Fix typo s/initalize/initialize/ 2016-03-23 16:14:12 +00:00
CastSizeChecker.cpp Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Checkers 2015-12-28 13:06:58 +00:00
CastToStructChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
CheckObjCDealloc.cpp [analyzer] Add CIFIlter modeling to DeallocChecker. 2016-03-25 21:18:22 +00:00
CheckObjCInstMethSignature.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
CheckSecuritySyntaxOnly.cpp Test commit 2015-11-26 22:08:58 +00:00
CheckSizeofPointer.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
CheckerDocumentation.cpp [analyzer] Add checker callback for beginning of function. 2016-02-19 01:35:10 +00:00
Checkers.td [analyzer] Move ObjCSuperDeallocChecker out of the alpha package. 2016-03-02 22:01:03 +00:00
ChrootChecker.cpp Fix some Clang-tidy readability-redundant-control-flow warnings; other minor fixes. 2016-02-10 19:11:58 +00:00
ClangCheckers.cpp
ClangSACheckers.h Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
DeadStoresChecker.cpp [analyzer] DeadStoresChecker: Treat locals captured by reference in C++ lambdas as escaped. 2015-11-20 01:53:44 +00:00
DebugCheckers.cpp [analyzer] Fix IssueHash generation. 2015-12-01 09:00:41 +00:00
DereferenceChecker.cpp [analyzer] Improve Nullability checker diagnostics 2016-01-29 18:43:15 +00:00
DirectIvarAssignment.cpp Use instance_properties instead of properties. NFC. 2016-01-26 18:05:23 +00:00
DivZeroChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
DynamicTypeChecker.cpp [Static Analyzer] Fixed a false positive case in DynamicTypeChecker when dealing with forward declarations. 2015-09-18 23:38:57 +00:00
DynamicTypePropagation.cpp Fix some Clang-tidy readability-redundant-control-flow warnings; other minor fixes. 2016-02-10 19:11:58 +00:00
ExprInspectionChecker.cpp [analyzer] Provide .def-files and visitors for SVal/SymExpr/MemRegion, v2. 2016-01-15 15:22:05 +00:00
FixedAddressChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
GenericTaintChecker.cpp Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Checkers 2015-12-28 13:06:58 +00:00
IdenticalExprChecker.cpp Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Checkers 2015-12-28 13:06:58 +00:00
InterCheckerAPI.h Add a missing forward def of CheckerManager. NFC. 2015-04-17 17:00:16 +00:00
IvarInvalidationChecker.cpp Fix some Clang-tidy readability-redundant-control-flow warnings; other minor fixes. 2016-02-10 19:11:58 +00:00
LLVMConventionsChecker.cpp Remove and forbid raw_svector_ostream::flush() calls. 2015-08-13 18:12:56 +00:00
LocalizationChecker.cpp Simplify users of StringRef::{l,r}trim (clang) (NFC) 2016-02-16 02:14:44 +00:00
MacOSKeychainAPIChecker.cpp Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Checkers 2015-12-28 13:06:58 +00:00
MacOSXAPIChecker.cpp Simplify users of StringRef::{l,r}trim (clang) (NFC) 2016-02-16 02:14:44 +00:00
MallocChecker.cpp [analyzer] Fix missed leak from MSVC specific allocation functions 2016-03-08 01:21:51 +00:00
MallocOverflowSecurityChecker.cpp [analyzer] Discard malloc-overflow bug-report when a known size is malloc'ed. 2015-09-23 23:27:55 +00:00
MallocSizeofChecker.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
NSAutoreleasePoolChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
NSErrorChecker.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
NoReturnFunctionChecker.cpp [analyzer] Handle another Android assert function. 2015-12-30 00:08:59 +00:00
NonNullParamChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
NullabilityChecker.cpp [analyzer] Nullability: Don't warn along paths where null returned from non-null. 2016-03-28 20:30:25 +00:00
ObjCAtSyncChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
ObjCContainersASTChecker.cpp Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Checkers 2015-12-28 13:06:58 +00:00
ObjCContainersChecker.cpp Fix some Clang-tidy readability-redundant-control-flow warnings; other minor fixes. 2016-02-10 19:11:58 +00:00
ObjCMissingSuperCallChecker.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00
ObjCSelfInitChecker.cpp Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Checkers 2015-12-28 13:06:58 +00:00
ObjCSuperDeallocChecker.cpp Move class into anonymous namespace. NFC. 2016-03-04 14:18:52 +00:00
ObjCUnusedIVarsChecker.cpp Rewrite users of Stmt::child_begin/end into for-range loops. 2015-07-03 15:12:24 +00:00
PaddingChecker.cpp StaticAnalyzer: Avoid an unintentional copy 2016-03-22 17:50:05 +00:00
PointerArithChecker.cpp [analyzer] Improve pointer arithmetic checker. 2016-02-23 12:34:39 +00:00
PointerSubChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
PthreadLockChecker.cpp Fix some Clang-tidy modernize warnings, other minor fixes. 2015-11-04 21:37:17 +00:00
RetainCountChecker.cpp Put global classes into the appropriate namespace. 2015-10-28 13:54:16 +00:00
ReturnPointerRangeChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
ReturnUndefChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
SelectorExtras.h Use the new LLVM_END_WITH_NULL name 2014-11-04 01:13:43 +00:00
SimpleStreamChecker.cpp [analyzer] Utility to match function calls. 2016-01-22 22:32:46 +00:00
StackAddrEscapeChecker.cpp [analyzer] Suppress stack address escape on CK_CopyAndAutoreleaseBlockObject. 2015-12-03 19:41:24 +00:00
StreamChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
TaintTesterChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
TestAfterDivZeroChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
TraversalChecker.cpp [analyzer] Add checker callback for beginning of function. 2016-02-19 01:35:10 +00:00
UndefBranchChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
UndefCapturedBlockVarChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
UndefResultChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
UndefinedArraySubscriptChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
UndefinedAssignmentChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
UnixAPIChecker.cpp [analyzer] Add generateErrorNode() APIs to CheckerContext. 2015-09-16 22:03:05 +00:00
UnreachableCodeChecker.cpp Avoid overly large SmallPtrSet/SmallSet 2016-01-30 01:27:06 +00:00
VLASizeChecker.cpp Fix some Clang-tidy readability-redundant-control-flow warnings; other minor fixes. 2016-02-10 19:11:58 +00:00
VforkChecker.cpp Fix Clang-tidy modernize-use-nullptr warnings; other minor fixes. 2016-01-26 19:01:06 +00:00
VirtualCallChecker.cpp [analyzer] Apply whitespace cleanups by Honggyu Kim. 2015-09-08 03:50:52 +00:00