]> granicus.if.org Git - clang/commit
[analyzer] Don't warn for returning void expressions in void blocks.
authorJordan Rose <jordan_rose@apple.com>
Wed, 17 Apr 2013 18:03:48 +0000 (18:03 +0000)
committerJordan Rose <jordan_rose@apple.com>
Wed, 17 Apr 2013 18:03:48 +0000 (18:03 +0000)
commit898be7b4a7b0a527d9bd2569eebc41a198e6e528
treeb6d05399f9d75ec2441832e3db7714a044f83a58
parent919398bb40d5d643f38b6595f5e8eac641e89d50
[analyzer] Don't warn for returning void expressions in void blocks.

This was slightly tricky because BlockDecls don't currently store an
inferred return type. However, we can rely on the fact that blocks with
inferred return types will have return statements that match the inferred
type.

<rdar://problem/13665798>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179699 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp
lib/StaticAnalyzer/Core/CallEvent.cpp
test/Analysis/uninit-vals-ps.c