summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/StmtPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/StmtPrinter.cpp')
-rw-r--r--clang/lib/AST/StmtPrinter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp
index 292d593c7aa..746049b1661 100644
--- a/clang/lib/AST/StmtPrinter.cpp
+++ b/clang/lib/AST/StmtPrinter.cpp
@@ -1344,9 +1344,9 @@ void StmtPrinter::VisitLambdaExpr(LambdaExpr *Node) {
// FIXME: Attributes
- // FIXME: Suppress trailing return type if it wasn't specified in
- // the source.
- OS << " -> " << Proto->getResultType().getAsString(Policy);
+ // Print the trailing return type if it was specified in the source.
+ if (Node->hasExplicitResultType())
+ OS << " -> " << Proto->getResultType().getAsString(Policy);
}
// Print the body.
OpenPOWER on IntegriCloud