diff options
author | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
commit | c86b984ea8ecb3e944dc3de48539f4c1f65851ea (patch) | |
tree | 3eb853da77d46cc77c4b017525a422f9ddb1385b /lib/Index/CommentToXML.cpp | |
parent | c696171ff15f0ee60dea4abfd99a135473c95656 (diff) | |
download | FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.zip FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.tar.gz |
Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc1@226102
Diffstat (limited to 'lib/Index/CommentToXML.cpp')
-rw-r--r-- | lib/Index/CommentToXML.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/Index/CommentToXML.cpp b/lib/Index/CommentToXML.cpp index a67c806..ef6aeef 100644 --- a/lib/Index/CommentToXML.cpp +++ b/lib/Index/CommentToXML.cpp @@ -15,7 +15,6 @@ #include "clang/AST/CommentVisitor.h" #include "clang/Format/Format.h" #include "clang/Index/USRGeneration.h" -#include "clang/Lex/Lexer.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/TinyPtrVector.h" #include "llvm/Support/raw_ostream.h" @@ -609,14 +608,9 @@ void CommentASTToXMLConverter::formatTextOfDeclaration( .getLocWithOffset(0); unsigned Length = Declaration.size(); - std::vector<CharSourceRange> Ranges( - 1, CharSourceRange::getCharRange(Start, Start.getLocWithOffset(Length))); - ASTContext &Context = DI->CurrentDecl->getASTContext(); - const LangOptions &LangOpts = Context.getLangOpts(); - Lexer Lex(ID, FormatRewriterContext.Sources.getBuffer(ID), - FormatRewriterContext.Sources, LangOpts); tooling::Replacements Replace = reformat( - format::getLLVMStyle(), Lex, FormatRewriterContext.Sources, Ranges); + format::getLLVMStyle(), FormatRewriterContext.Sources, ID, + CharSourceRange::getCharRange(Start, Start.getLocWithOffset(Length))); applyAllReplacements(Replace, FormatRewriterContext.Rewrite); Declaration = FormatRewriterContext.getRewrittenText(ID); } |