Commit Graph

8 Commits

Author SHA1 Message Date
George Karpenkov ffc857a528 [analyzer] Fix tracking expressions through negation operator
Differential Revision: https://reviews.llvm.org/D50537

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339476 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-10 21:42:19 +00:00
George Karpenkov b319a856c2 [analyzer] Do not crash in NoStoreFuncVisitor notes if an unexpected region is found.
Just do not generate the note at all in that case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338935 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-03 23:19:07 +00:00
George Karpenkov d247691d08 [analyzer] Extend NoStoreFuncVisitor to follow fields.
rdar://39701823

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338667 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-02 02:02:40 +00:00
George Karpenkov ab6efb3942 [analyzer] Extend NoStoreFuncVisitor to insert a note on IVars
The note is added in the following situation:

 - We are throwing a nullability-related warning on an IVar
 - The path goes through a method which *could have* (syntactically
   determined) written into that IVar, but did not

rdar://42444460

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338149 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 18:26:40 +00:00
George Karpenkov f70ff96a80 Revert "[analyzer] Extend NoStoreFuncVisitor to insert a note on IVars"
This reverts commit a9e21bd727112cd69eabc1af648c5da6b773d06e.
Reverted because the dependency has not landed yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337866 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 23:23:33 +00:00
George Karpenkov 77284fe5d8 [analyzer] Extend NoStoreFuncVisitor to insert a note on IVars
The note is added in the following situation:

 - We are throwing a nullability-related warning on an IVar
 - The path goes through a method which *could have* (syntactically
 determined) written into that IVar, but did not

rdar://42444460

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337864 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 23:14:29 +00:00
George Karpenkov b28c0c543c [analyzer] Do not crash in the visitor when the function is given more arguments than it has parameters
rdar://40335545

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334560 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-12 23:53:54 +00:00
George Karpenkov 4f283ec900 [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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325976 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-23 23:26:56 +00:00