diff options
author | Richard Trieu <rtrieu@google.com> | 2017-11-11 00:54:25 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2017-11-11 00:54:25 +0000 |
commit | 931638ecb65df77e6a493b0fe6909d01583843f0 (patch) | |
tree | 0ff8ba2cbdeabf2eec0261b400d3a55d69d1d6e1 /clang/lib/AST/StmtProfile.cpp | |
parent | 5c2266125522470730d55c0ec857dcbdff94c487 (diff) | |
download | bcm5719-llvm-931638ecb65df77e6a493b0fe6909d01583843f0.tar.gz bcm5719-llvm-931638ecb65df77e6a493b0fe6909d01583843f0.zip |
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
Diffstat (limited to 'clang/lib/AST/StmtProfile.cpp')
-rw-r--r-- | clang/lib/AST/StmtProfile.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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: |