aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/StmtPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/StmtPrinter.cpp')
-rw-r--r--lib/AST/StmtPrinter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp
index 292d593c7a..746049b166 100644
--- a/lib/AST/StmtPrinter.cpp
+++ b/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.