[analyzer] Look through temporary destructors when finding a region to construct.
authorJordan Rose <jordan_rose@apple.com>
Sat, 5 Apr 2014 02:01:41 +0000 (02:01 +0000)
committerJordan Rose <jordan_rose@apple.com>
Sat, 5 Apr 2014 02:01:41 +0000 (02:01 +0000)
commit8a5a094ec5a4e23e5e7a2862e2ada60ec82f1f7b
tree57315f76d2ddb3022deff9c3aa6e283343d56abe
parent41e9b1d5595874f5bd8a6f8668a0482a95c07d22
[analyzer] Look through temporary destructors when finding a region to construct.

Fixes a false positive when temporary destructors are enabled where a temporary
is destroyed after a variable is constructed but before the VarDecl itself is
processed, which occurs when the variable is in the condition of an if or while.

Patch by Alex McCarthy, with an extra test from me.

llvm-svn: 205661
clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
clang/test/Analysis/dtor.cpp