[analyzer] mark returns of functions where the region passed as parameter was not...
authorGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 23 Feb 2018 23:26:56 +0000 (23:26 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 23 Feb 2018 23:26:56 +0000 (23:26 +0000)
commite15451a9c04fa977a4911ca144904293e13e4326
treebb2da3b51617da7fd5f163d2bf9f7feb84c0f106
parent80e4ba24b9baa6d7312df70b681e613cc85a77f3
[analyzer] mark returns of functions where the region passed as parameter was not initialized

In the wild, many cases of null pointer dereference, or uninitialized
value read occur because the value was meant to be initialized by the
inlined function, but did not, most often due to error condition in the
inlined function.
This change highlights the return branch taken by the inlined function,
in order to help user understand the error report and see why the value
was uninitialized.

rdar://36287652

Differential Revision: https://reviews.llvm.org/D41848

llvm-svn: 325976
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
clang/test/Analysis/diagnostics/no-store-func-path-notes.c [new file with mode: 0644]
clang/test/Analysis/diagnostics/no-store-func-path-notes.cpp [new file with mode: 0644]
clang/test/Analysis/diagnostics/no-store-func-path-notes.m [new file with mode: 0644]
clang/test/Analysis/diagnostics/undef-value-param.c
clang/test/Analysis/diagnostics/undef-value-param.m