diff options
Diffstat (limited to 'clang/lib/Format/WhitespaceManager.cpp')
-rw-r--r-- | clang/lib/Format/WhitespaceManager.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/clang/lib/Format/WhitespaceManager.cpp b/clang/lib/Format/WhitespaceManager.cpp index f7b65fc72cf..daf63697b0c 100644 --- a/clang/lib/Format/WhitespaceManager.cpp +++ b/clang/lib/Format/WhitespaceManager.cpp @@ -46,19 +46,6 @@ void WhitespaceManager::replaceWhitespace(const AnnotatedToken &Tok, true, Tok.FormatTok.WhitespaceRange, Spaces, StartOfTokenColumn, Newlines, "", "", Tok.FormatTok.Tok.getKind(), InPPDirective && !Tok.FormatTok.IsFirst)); - - // Align line comments if they are trailing or if they continue other - // trailing comments. - // FIXME: Pull this out and generalize so it works the same way in broken - // comments and unbroken comments with trailing whitespace. - if (Tok.isTrailingComment()) { - SourceLocation TokenEndLoc = Tok.FormatTok.getStartOfNonWhitespace() - .getLocWithOffset(Tok.FormatTok.TokenLength); - // Remove the comment's trailing whitespace. - if (Tok.FormatTok.TrailingWhiteSpaceLength != 0) - Replaces.insert(tooling::Replacement( - SourceMgr, TokenEndLoc, Tok.FormatTok.TrailingWhiteSpaceLength, "")); - } } void WhitespaceManager::addUntouchableToken(const FormatToken &Tok, @@ -86,12 +73,6 @@ void WhitespaceManager::breakToken(const FormatToken &Tok, unsigned Offset, tok::unknown, InPPDirective && !Tok.IsFirst)); } -void WhitespaceManager::addReplacement(const SourceLocation &SourceLoc, - unsigned ReplaceChars, StringRef Text) { - Replaces.insert( - tooling::Replacement(SourceMgr, SourceLoc, ReplaceChars, Text)); -} - const tooling::Replacements &WhitespaceManager::generateReplacements() { if (Changes.empty()) return Replaces; |