diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-02-13 13:42:54 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-02-13 13:42:54 +0000 |
commit | 0772c42385c0d005db0ba75ecbcc54d353763282 (patch) | |
tree | d1dc6509a577aee07be533cbae15939b0aa32f2c /clang/lib/Index/CommentToXML.cpp | |
parent | 2193e23cd72731c0d46a4ca8f09efe88b1c5f7b2 (diff) | |
download | bcm5719-llvm-0772c42385c0d005db0ba75ecbcc54d353763282.tar.gz bcm5719-llvm-0772c42385c0d005db0ba75ecbcc54d353763282.zip |
Reduce the number of implicit StringRef->std::string conversions by threading StringRef through more APIs.
No functionality change intended.
llvm-svn: 260815
Diffstat (limited to 'clang/lib/Index/CommentToXML.cpp')
-rw-r--r-- | clang/lib/Index/CommentToXML.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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. |