diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-01-26 03:16:31 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-01-26 03:16:31 +0000 |
commit | 9853371f24c50326c379baeb5e8f8bd6a40b3a96 (patch) | |
tree | eff29e9c85baaca983dde5818fddcac124a78484 /clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | 9c67267a7bcedd38ceb0b38719f4008f57bb0039 (diff) | |
download | bcm5719-llvm-9853371f24c50326c379baeb5e8f8bd6a40b3a96.tar.gz bcm5719-llvm-9853371f24c50326c379baeb5e8f8bd6a40b3a96.zip |
[analyzer] C++ initializers may require cleanups; look through these.
When the analyzer sees an initializer, it checks if the initializer
contains a CXXConstructExpr. If so, it trusts that the CXXConstructExpr
does the necessary work to initialize the object, and performs no further
initialization.
This patch looks through any implicit wrapping expressions like
ExprWithCleanups to find the CXXConstructExpr inside.
Fixes PR15070.
llvm-svn: 173557
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index a1fc29eb7e4..26a3f9b1f53 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -404,7 +404,7 @@ void ExprEngine::ProcessInitializer(const CFGInitializer Init, if (BMI->isAnyMemberInitializer()) { // Constructors build the object directly in the field, // but non-objects must be copied in from the initializer. - const Expr *Init = BMI->getInit(); + const Expr *Init = BMI->getInit()->IgnoreImplicit(); if (!isa<CXXConstructExpr>(Init)) { SVal FieldLoc; if (BMI->isIndirectMemberInitializer()) |