Changeset View
Changeset View
Standalone View
Standalone View
clang-tools-extra/trunk/clang-doc/Representation.h
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | struct CommentInfo { | ||||
bool operator<(const CommentInfo &Other) const { | bool operator<(const CommentInfo &Other) const { | ||||
auto FirstCI = std::tie(Kind, Text, Name, Direction, ParamName, CloseName, | auto FirstCI = std::tie(Kind, Text, Name, Direction, ParamName, CloseName, | ||||
SelfClosing, Explicit, AttrKeys, AttrValues, Args); | SelfClosing, Explicit, AttrKeys, AttrValues, Args); | ||||
auto SecondCI = | auto SecondCI = | ||||
std::tie(Other.Kind, Other.Text, Other.Name, Other.Direction, | std::tie(Other.Kind, Other.Text, Other.Name, Other.Direction, | ||||
Other.ParamName, Other.CloseName, Other.SelfClosing, | Other.ParamName, Other.CloseName, Other.SelfClosing, | ||||
Other.Explicit, Other.AttrKeys, Other.AttrValues, Other.Args); | Other.Explicit, Other.AttrKeys, Other.AttrValues, Other.Args); | ||||
if (FirstCI < SecondCI || | if (FirstCI < SecondCI) | ||||
(FirstCI == SecondCI && Children.size() < Other.Children.size())) | |||||
return true; | return true; | ||||
if (FirstCI > SecondCI || Children.size() > Other.Children.size()) | if (FirstCI == SecondCI) { | ||||
return false; | return std::lexicographical_compare( | ||||
Children.begin(), Children.end(), Other.Children.begin(), | |||||
Other.Children.end(), llvm::deref<llvm::less>()); | |||||
} | |||||
return std::equal(Children.begin(), Children.end(), Other.Children.begin(), | return false; | ||||
llvm::deref<llvm::less>{}); | |||||
} | } | ||||
SmallString<16> | SmallString<16> | ||||
Kind; // Kind of comment (FullComment, ParagraphComment, TextComment, | Kind; // Kind of comment (FullComment, ParagraphComment, TextComment, | ||||
// InlineCommandComment, HTMLStartTagComment, HTMLEndTagComment, | // InlineCommandComment, HTMLStartTagComment, HTMLEndTagComment, | ||||
// BlockCommandComment, ParamCommandComment, | // BlockCommandComment, ParamCommandComment, | ||||
// TParamCommandComment, VerbatimBlockComment, | // TParamCommandComment, VerbatimBlockComment, | ||||
// VerbatimBlockLineComment, VerbatimLineComment). | // VerbatimBlockLineComment, VerbatimLineComment). | ||||
▲ Show 20 Lines • Show All 247 Lines • Show Last 20 Lines |