18 return C ==
' ' || C ==
'\n' || C ==
'\r' ||
19 C ==
'\t' || C ==
'\f' || C ==
'\v';
24 void cleanupBrief(std::string &S) {
25 bool PrevWasSpace =
true;
26 std::string::iterator O = S.begin();
27 for (std::string::iterator I = S.begin(), E = S.end();
41 if (O != S.begin() && *(O - 1) ==
' ')
44 S.resize(O - S.begin());
48 for (StringRef::const_iterator I = Text.begin(), E = Text.end();
58 L(L), Traits(Traits) {
64 std::string FirstParagraphOrBrief;
65 std::string ReturnsParagraph;
66 bool InFirstParagraph =
true;
68 bool InReturns =
false;
72 if (InFirstParagraph || InBrief)
73 FirstParagraphOrBrief += Tok.
getText();
75 ReturnsParagraph += Tok.
getText();
83 FirstParagraphOrBrief.clear();
91 InFirstParagraph =
false;
92 ReturnsParagraph +=
"Returns ";
99 InFirstParagraph =
false;
106 if (InFirstParagraph || InBrief)
107 FirstParagraphOrBrief +=
' ';
109 ReturnsParagraph +=
' ';
131 if (InFirstParagraph && !
isWhitespace(FirstParagraphOrBrief))
132 InFirstParagraph =
false;
143 cleanupBrief(FirstParagraphOrBrief);
144 if (!FirstParagraphOrBrief.empty())
145 return FirstParagraphOrBrief;
147 cleanupBrief(ReturnsParagraph);
148 return ReturnsParagraph;
LLVM_READONLY bool isWhitespace(unsigned char c)
Return true if this character is horizontal or vertical ASCII whitespace: ' ', '\t', '\f', '\v', '\n', '\r'.
Dataflow Directional Tag Classes.