diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-08-03 23:31:15 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-08-03 23:31:15 +0000 |
commit | 563ea2335d7d0df44bbfe8941f64523e8af1fc14 (patch) | |
tree | 57b988f641b3a5db15d84e2ad59ccb0321357d5d /lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | 685379965c1b105ce89cf4f6c60810932b7f4d0d (diff) |
[analyzer] Update initializer assertion for delegating constructors.
Like base constructors, delegating constructors require no further
processing in the CFGInitializer node.
Also, add PrettyStackTraceLoc to the initializer and destructor logic
so we can get better stack traces in the future.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngine.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index b46dc49a1b..b0435fb562 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -360,8 +360,13 @@ void ExprEngine::ProcessInitializer(const CFGInitializer Init, ProgramStateRef State = Pred->getState(); - // We don't set EntryNode and currentStmt. And we don't clean up state. const CXXCtorInitializer *BMI = Init.getInitializer(); + + PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(), + BMI->getSourceLocation(), + "Error evaluating initializer"); + + // We don't set EntryNode and currentStmt. And we don't clean up state. const StackFrameContext *stackFrame = cast<StackFrameContext>(Pred->getLocationContext()); const CXXConstructorDecl *decl = @@ -383,7 +388,7 @@ void ExprEngine::ProcessInitializer(const CFGInitializer Init, State = State->bindLoc(FieldLoc, InitVal); } } else { - assert(BMI->isBaseInitializer()); + assert(BMI->isBaseInitializer() || BMI->isDelegatingInitializer()); // We already did all the work when visiting the CXXConstructExpr. } |