diff options
| author | Artem Dergachev <artem.dergachev@gmail.com> | 2018-07-31 21:17:40 +0000 |
|---|---|---|
| committer | Artem Dergachev <artem.dergachev@gmail.com> | 2018-07-31 21:17:40 +0000 |
| commit | 67d393f3d12eb499a2314da552aabc2f77949b44 (patch) | |
| tree | 0dbe8c9b05532aa7b587644e9e707d0a9642b5ac /clang/lib | |
| parent | 2a895e57aff3e7f5387ca5be76189cfb32489483 (diff) | |
| download | bcm5719-llvm-67d393f3d12eb499a2314da552aabc2f77949b44.tar.gz bcm5719-llvm-67d393f3d12eb499a2314da552aabc2f77949b44.zip | |
[analyzer] Fix eliding the same destructor twice due to buggy default arguments.
Because of incomplete support for CXXDefaultArgExpr, we cannot yet commit to
asserting that the same destructor won't be elided twice.
Suppress the assertion failure for now. Proper support is still an open problem.
Differential Revision: https://reviews.llvm.org/D49213
llvm-svn: 338441
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index f90c7f8e8f6..2b4bdd754fd 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -460,7 +460,8 @@ ProgramStateRef ExprEngine::elideDestructor(ProgramStateRef State, const CXXBindTemporaryExpr *BTE, const LocationContext *LC) { ConstructedObjectKey Key({BTE, /*IsElided=*/true}, LC); - assert(!State->contains<ObjectsUnderConstruction>(Key)); + // FIXME: Currently the state might already contain the marker due to + // incorrect handling of temporaries bound to default parameters. return State->set<ObjectsUnderConstruction>(Key, UnknownVal()); } |

