Browse Source

Increased the initial capacity of the used SmallString when generating a USR.

pull/248/head
Elias Holzer 12 years ago
parent
commit
1782715f93
  1. 2
      src/CppParser/Parser.cpp
  2. 2
      src/Parser/Parser.cpp

2
src/CppParser/Parser.cpp

@ -300,7 +300,7 @@ static std::string GetTagDeclName(const clang::TagDecl* D)
static std::string GetDeclUSR(const clang::Decl* D) static std::string GetDeclUSR(const clang::Decl* D)
{ {
using namespace clang; using namespace clang;
SmallString<8> usr; SmallString<128> usr;
if (!index::generateUSRForDecl(D, usr)) if (!index::generateUSRForDecl(D, usr))
return usr.str(); return usr.str();
return "<invalid>"; return "<invalid>";

2
src/Parser/Parser.cpp

@ -296,7 +296,7 @@ static std::string GetTagDeclName(const clang::TagDecl* D)
static std::string GetDeclUSR(const clang::Decl* D) static std::string GetDeclUSR(const clang::Decl* D)
{ {
using namespace clang; using namespace clang;
SmallString<8> usr; SmallString<128> usr;
if (!index::generateUSRForDecl(D, usr)) if (!index::generateUSRForDecl(D, usr))
return usr.str(); return usr.str();
return "<invalid>"; return "<invalid>";

Loading…
Cancel
Save