summaryrefslogtreecommitdiff
path: root/lib/Format/UnwrappedLineParser.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-03-10 10:02:02 +0000
committerDaniel Jasper <djasper@google.com>2014-03-10 10:02:02 +0000
commitf2d2d02c15b4e7afb5c129f50b844ae3fe8e1ead (patch)
tree6ce015b06583257c978e5221f487d9b6b4701b34 /lib/Format/UnwrappedLineParser.cpp
parente933f45b227136ef3035fa4995e424da7d43d677 (diff)
downloadclang-f2d2d02c15b4e7afb5c129f50b844ae3fe8e1ead.tar.gz
clang-f2d2d02c15b4e7afb5c129f50b844ae3fe8e1ead.tar.bz2
clang-f2d2d02c15b4e7afb5c129f50b844ae3fe8e1ead.tar.xz
clang-format: Add spaces around trailing/lambda return types.
Before: int c = []()->int { return 2; }(); After: int c = []() -> int { return 2; }(); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203452 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/UnwrappedLineParser.cpp')
-rw-r--r--lib/Format/UnwrappedLineParser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp
index b7de63fd0f..6930bd22bc 100644
--- a/lib/Format/UnwrappedLineParser.cpp
+++ b/lib/Format/UnwrappedLineParser.cpp
@@ -784,7 +784,10 @@ bool UnwrappedLineParser::tryToParseLambda() {
case tok::identifier:
case tok::coloncolon:
case tok::kw_mutable:
+ nextToken();
+ break;
case tok::arrow:
+ FormatTok->Type = TT_TrailingReturnArrow;
nextToken();
break;
default: