]> granicus.if.org Git - clang/commit
[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)
commitfbdbed3bde8577815826b9d15790e5effb913f7b
treefdc192c69de3661cf8efffcaaa9c98b988ab34c4
parent59c900304a390b11c4efcad2924bf6373979db73
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176042 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/ExprEngine.cpp
lib/StaticAnalyzer/Core/RegionStore.cpp
test/Analysis/global_region_invalidation.mm
test/Analysis/inline.cpp