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/StmtPrinter.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/StmtPrinter.cpp')
-rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 371d3e181d2..09092743f0d 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -2232,6 +2232,9 @@ void StmtPrinter::VisitLambdaExpr(LambdaExpr *Node) { CEnd = Node->explicit_capture_end(); C != CEnd; ++C) { + if (C->capturesVLAType()) + continue; + if (NeedComma) OS << ", "; NeedComma = true; |