Commit Graph

9 Commits

Author SHA1 Message Date
Artem Dergachev 31f81399bd [analyzer] [tests] [quickfix] Make more test more resilient for non-defaut -std.
It is important to specify the version of the standard because tests should
test the same thing regardless of the current default version of the standard.

llvm-svn: 343736
2018-10-03 22:48:00 +00:00
George Karpenkov b5dd3ccdbd [analyzer] Fix tracking expressions through negation operator
Differential Revision: https://reviews.llvm.org/D50537

llvm-svn: 339476
2018-08-10 21:42:19 +00:00
George Karpenkov 09c31b1c99 [analyzer] Do not crash in NoStoreFuncVisitor notes if an unexpected region is found.
Just do not generate the note at all in that case.

llvm-svn: 338935
2018-08-03 23:19:07 +00:00
George Karpenkov 1d08c51ee5 [analyzer] Extend NoStoreFuncVisitor to follow fields.
rdar://39701823

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

llvm-svn: 338667
2018-08-02 02:02:40 +00:00
George Karpenkov b293c6bb54 [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

llvm-svn: 338149
2018-07-27 18:26:40 +00:00
George Karpenkov 5c0a822177 Revert "[analyzer] Extend NoStoreFuncVisitor to insert a note on IVars"
This reverts commit a9e21bd727112cd69eabc1af648c5da6b773d06e.
Reverted because the dependency has not landed yet.

llvm-svn: 337866
2018-07-24 23:23:33 +00:00
George Karpenkov 71692e7f00 [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

llvm-svn: 337864
2018-07-24 23:14:29 +00:00
George Karpenkov e6fdb6a28c [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

llvm-svn: 334560
2018-06-12 23:53:54 +00:00
George Karpenkov e15451a9c0 [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
2018-02-23 23:26:56 +00:00