From 931638ecb65df77e6a493b0fe6909d01583843f0 Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Sat, 11 Nov 2017 00:54:25 +0000 Subject: Handle lambda captures of variable length arrays in profiling and printing. From http://reviews.llvm.org/D4368 these cases were thought to not be reachable and the checks removed before the rest of the code was committed in r216649. However, these cases are reachable and the checks are added back. llvm-svn: 317957 --- clang/lib/AST/StmtProfile.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/AST/StmtProfile.cpp') diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index 9acd79bc2ca..6cc77f682ee 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -1590,6 +1590,9 @@ StmtProfiler::VisitLambdaExpr(const LambdaExpr *S) { for (LambdaExpr::capture_iterator C = S->explicit_capture_begin(), CEnd = S->explicit_capture_end(); C != CEnd; ++C) { + if (C->capturesVLAType()) + continue; + ID.AddInteger(C->getCaptureKind()); switch (C->getCaptureKind()) { case LCK_StarThis: -- cgit v1.2.3