From bd3306aecb3a15e8967143b8cdbbccf2b1b19b74 Mon Sep 17 00:00:00 2001 From: patrick Date: Sat, 14 Jan 2017 19:55:43 +0000 Subject: Import LLVM 3.9.1 including clang and lld. --- gnu/llvm/tools/clang/lib/Index/CommentToXML.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gnu/llvm/tools/clang/lib/Index/CommentToXML.cpp') diff --git a/gnu/llvm/tools/clang/lib/Index/CommentToXML.cpp b/gnu/llvm/tools/clang/lib/Index/CommentToXML.cpp index 15f1696cbe9..c4beef24946 100644 --- a/gnu/llvm/tools/clang/lib/Index/CommentToXML.cpp +++ b/gnu/llvm/tools/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-59-g8ed1b