From 0772c42385c0d005db0ba75ecbcc54d353763282 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 13 Feb 2016 13:42:54 +0000 Subject: Reduce the number of implicit StringRef->std::string conversions by threading StringRef through more APIs. No functionality change intended. llvm-svn: 260815 --- clang/lib/Index/CommentToXML.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/Index/CommentToXML.cpp') diff --git a/clang/lib/Index/CommentToXML.cpp b/clang/lib/Index/CommentToXML.cpp index 15f1696cbe9..c4beef24946 100644 --- a/clang/lib/Index/CommentToXML.cpp +++ b/clang/lib/Index/CommentToXML.cpp @@ -592,9 +592,8 @@ void getSourceTextOfDeclaration(const DeclInfo *ThisDecl, void CommentASTToXMLConverter::formatTextOfDeclaration( const DeclInfo *DI, SmallString<128> &Declaration) { - // FIXME. formatting API expects null terminated input string. - // There might be more efficient way of doing this. - std::string StringDecl = Declaration.str(); + // Formatting API expects null terminated input string. + StringRef StringDecl(Declaration.c_str(), Declaration.size()); // Formatter specific code. // Form a unique in memory buffer name. -- cgit v1.2.3