20void cleanupBrief(std::string &S) {
21 bool PrevWasSpace =
true;
22 std::string::iterator O = S.begin();
23 for (std::string::iterator I = S.begin(),
E = S.end();
36 if (O != S.begin() && *(O - 1) ==
' ')
39 S.resize(O - S.begin());
48 L(L), Traits(Traits) {
54 std::string FirstParagraphOrBrief;
55 std::string ReturnsParagraph;
56 bool InFirstParagraph =
true;
58 bool InReturns =
false;
62 if (InFirstParagraph || InBrief)
63 FirstParagraphOrBrief += Tok.
getText();
65 ReturnsParagraph += Tok.
getText();
73 FirstParagraphOrBrief.clear();
81 InFirstParagraph =
false;
82 ReturnsParagraph +=
"Returns ";
89 InFirstParagraph =
false;
96 if (InFirstParagraph || InBrief)
97 FirstParagraphOrBrief +=
' ';
99 ReturnsParagraph +=
' ';
121 if (InFirstParagraph && !
isWhitespace(FirstParagraphOrBrief))
122 InFirstParagraph =
false;
133 cleanupBrief(FirstParagraphOrBrief);
134 if (!FirstParagraphOrBrief.empty())
135 return FirstParagraphOrBrief;
137 cleanupBrief(ReturnsParagraph);
138 return ReturnsParagraph;
The JSON file list parser is used to communicate input to InstallAPI.
LLVM_READONLY bool isWhitespace(unsigned char c)
Return true if this character is horizontal or vertical ASCII whitespace: ' ', '\t',...