diff options
Diffstat (limited to 'clang/lib/Format')
-rw-r--r-- | clang/lib/Format/Format.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index ad390c23dcd..0dd47fe4a99 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -589,7 +589,8 @@ private: State.Column, Line.InPPDirective); } - State.Stack.back().LastSpace = State.Column; + if (!Current.isTrailingComment()) + State.Stack.back().LastSpace = State.Column; if (Current.isOneOf(tok::arrow, tok::period) && Current.Type != TT_DesignatedInitializerPeriod) State.Stack.back().LastSpace += Current.CodePointCount; |