diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-14 00:03:17 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-14 00:03:17 +0000 |
commit | 993e3aa6b96adce7b48000b9ba4ff27266c87104 (patch) | |
tree | ed30c61c2b9049285621eba3e33ac172ac5b787e /lib/Serialization/ASTWriterStmt.cpp | |
parent | 6503e97e0f2d8032e9daeb4c8cfef00c409bd9f3 (diff) |
Remove custom handling of array copies in lambda by-value array capture and
copy constructors of classes with array members, instead using
ArrayInitLoopExpr to represent the initialization loop.
This exposed a bug in the static analyzer where it was unable to differentiate
between zero-initialized and unknown array values, which has also been fixed
here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289618 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r-- | lib/Serialization/ASTWriterStmt.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/Serialization/ASTWriterStmt.cpp b/lib/Serialization/ASTWriterStmt.cpp index fbe1d843cd..f66cc029f5 100644 --- a/lib/Serialization/ASTWriterStmt.cpp +++ b/lib/Serialization/ASTWriterStmt.cpp @@ -1257,10 +1257,6 @@ void ASTStmtWriter::VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *E) { void ASTStmtWriter::VisitLambdaExpr(LambdaExpr *E) { VisitExpr(E); Record.push_back(E->NumCaptures); - unsigned NumArrayIndexVars = 0; - if (E->HasArrayIndexVars) - NumArrayIndexVars = E->getArrayIndexStarts()[E->NumCaptures]; - Record.push_back(NumArrayIndexVars); Record.AddSourceRange(E->IntroducerRange); Record.push_back(E->CaptureDefault); // FIXME: stable encoding Record.AddSourceLocation(E->CaptureDefaultLoc); @@ -1275,15 +1271,6 @@ void ASTStmtWriter::VisitLambdaExpr(LambdaExpr *E) { Record.AddStmt(*C); } - // Add array index variables, if any. - if (NumArrayIndexVars) { - Record.append(E->getArrayIndexStarts(), - E->getArrayIndexStarts() + E->NumCaptures + 1); - VarDecl **ArrayIndexVars = E->getArrayIndexVars(); - for (unsigned I = 0; I != NumArrayIndexVars; ++I) - Record.AddDeclRef(ArrayIndexVars[I]); - } - Code = serialization::EXPR_LAMBDA; } |