diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-04-08 22:42:35 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-04-08 22:42:35 +0000 |
commit | 5fe98728dca1f3a7a378ce1a21984a0f8a0c0b8b (patch) | |
tree | d0d89fc8bb7a025910b5d14aae2fda0dac09d518 /lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | 4cf4b59e905c9e5c368757ab3455f2f499367feb (diff) |
Start overhauling static analyzer support for C++ constructors. The inlining support isn't complete, and needs
to be reworked to model CallEnter/CallExit (just like all other calls). For now, treat constructors mostly
like other function calls, making the analysis of C++ code just a little more useful.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129166 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngine.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index 2fd7b3b88a..0a7f1e93af 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -422,7 +422,6 @@ void ExprEngine::Visit(const Stmt* S, ExplodedNode* Pred, // C++ stuff we don't support yet. case Stmt::CXXBindTemporaryExprClass: case Stmt::CXXCatchStmtClass: - case Stmt::CXXDefaultArgExprClass: case Stmt::CXXDependentScopeMemberExprClass: case Stmt::CXXNullPtrLiteralExprClass: case Stmt::CXXPseudoDestructorExprClass: @@ -448,7 +447,14 @@ void ExprEngine::Visit(const Stmt* S, ExplodedNode* Pred, Engine.addAbortedBlock(node, Builder->getBlock()); break; } - + + // We don't handle default arguments either yet, but we can fake it + // for now by just skipping them. + case Stmt::CXXDefaultArgExprClass: { + Dst.Add(Pred); + break; + } + case Stmt::ParenExprClass: llvm_unreachable("ParenExprs already handled."); // Cases that should never be evaluated simply because they shouldn't |