17 return C ==
' ' || C ==
'\n' || C ==
'\r' ||
18 C ==
'\t' || C ==
'\f' || C ==
'\v';
23 void cleanupBrief(std::string &S) {
24 bool PrevWasSpace =
true;
25 std::string::iterator O = S.begin();
26 for (std::string::iterator I = S.begin(), E = S.end();
40 if (O != S.begin() && *(O - 1) ==
' ')
43 S.resize(O - S.begin());
47 for (StringRef::const_iterator I = Text.begin(), E = Text.end();
57 L(L), Traits(Traits) {
63 std::string FirstParagraphOrBrief;
64 std::string ReturnsParagraph;
65 bool InFirstParagraph =
true;
67 bool InReturns =
false;
71 if (InFirstParagraph || InBrief)
72 FirstParagraphOrBrief += Tok.
getText();
74 ReturnsParagraph += Tok.
getText();
82 FirstParagraphOrBrief.clear();
90 InFirstParagraph =
false;
91 ReturnsParagraph +=
"Returns ";
98 InFirstParagraph =
false;
105 if (InFirstParagraph || InBrief)
106 FirstParagraphOrBrief +=
' ';
108 ReturnsParagraph +=
' ';
130 if (InFirstParagraph && !
isWhitespace(FirstParagraphOrBrief))
131 InFirstParagraph =
false;
142 cleanupBrief(FirstParagraphOrBrief);
143 if (!FirstParagraphOrBrief.empty())
144 return FirstParagraphOrBrief;
146 cleanupBrief(ReturnsParagraph);
147 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.