aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/VersionTuple.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Basic/VersionTuple.h')
-rw-r--r--include/clang/Basic/VersionTuple.h33
1 files changed, 21 insertions, 12 deletions
diff --git a/include/clang/Basic/VersionTuple.h b/include/clang/Basic/VersionTuple.h
index 8a636d18a8..a94f76c182 100644
--- a/include/clang/Basic/VersionTuple.h
+++ b/include/clang/Basic/VersionTuple.h
@@ -74,15 +74,18 @@ public:
return X.Major == Y.Major && X.Minor == Y.Minor && X.Subminor == Y.Subminor;
}
- /// \brief Determine if two version numbers are not equivalent. If
- /// not provided, minor and subminor version numbers are considered to be
+ /// \brief Determine if two version numbers are not equivalent.
+ ///
+ /// If not provided, minor and subminor version numbers are considered to be
/// zero.
friend bool operator!=(const VersionTuple &X, const VersionTuple &Y) {
return !(X == Y);
}
- /// \brief Determine whether one version number precedes another. If not
- /// provided, minor and subminor version numbers are considered to be zero.
+ /// \brief Determine whether one version number precedes another.
+ ///
+ /// If not provided, minor and subminor version numbers are considered to be
+ /// zero.
friend bool operator<(const VersionTuple &X, const VersionTuple &Y) {
if (X.Major != Y.Major)
return X.Major < Y.Major;
@@ -93,31 +96,37 @@ public:
return X.Subminor < Y.Subminor;
}
- /// \brief Determine whether one version number follows another. If not
- /// provided, minor and subminor version numbers are considered to be zero.
+ /// \brief Determine whether one version number follows another.
+ ///
+ /// If not provided, minor and subminor version numbers are considered to be
+ /// zero.
friend bool operator>(const VersionTuple &X, const VersionTuple &Y) {
return Y < X;
}
/// \brief Determine whether one version number precedes or is
- /// equivalent to another. If not provided, minor and subminor
- /// version numbers are considered to be zero.
+ /// equivalent to another.
+ ///
+ /// If not provided, minor and subminor version numbers are considered to be
+ /// zero.
friend bool operator<=(const VersionTuple &X, const VersionTuple &Y) {
return !(Y < X);
}
/// \brief Determine whether one version number follows or is
- /// equivalent to another. If not provided, minor and subminor
- /// version numbers are considered to be zero.
+ /// equivalent to another.
+ ///
+ /// If not provided, minor and subminor version numbers are considered to be
+ /// zero.
friend bool operator>=(const VersionTuple &X, const VersionTuple &Y) {
return !(X < Y);
}
- /// \brief Retrieve a string representation of the version number/
+ /// \brief Retrieve a string representation of the version number.
std::string getAsString() const;
/// \brief Try to parse the given string as a version number.
- /// Returns true if the string does not match the regular expression
+ /// \returns \c true if the string does not match the regular expression
/// [0-9]+(\.[0-9]+(\.[0-9]+))
bool tryParse(StringRef string);
};