[analyzer] Handle reference parameters with default values.
authorJordan Rose <jordan_rose@apple.com>
Mon, 25 Feb 2013 19:45:34 +0000 (19:45 +0000)
committerJordan Rose <jordan_rose@apple.com>
Mon, 25 Feb 2013 19:45:34 +0000 (19:45 +0000)
commit77cdb53cdf91689ea27c4e75355d76fcb81c8fb4
treebedf7d38c01f0542c3504e37eb560241f563198f
parenta221e4e89cc3cba7b306716a7c7a5f287312c7f0
[analyzer] Handle reference parameters with default values.

r175026 added support for default values, but didn't take reference
parameters into account, which expect the default argument to be an
lvalue. Use createTemporaryRegionIfNeeded if we can evaluate the default
expr as an rvalue but the expected result is an lvalue.

Fixes the most recent report of PR12915. The original report predates
default argument support, so that can't be it.

llvm-svn: 176042
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
clang/lib/StaticAnalyzer/Core/RegionStore.cpp
clang/test/Analysis/global_region_invalidation.mm
clang/test/Analysis/inline.cpp