Skip to content

Commit a7d4cec

Browse files
committed
[NFC] Fix documentation for some utility classes.
This fixes a few warnings emitted when compiling with -Wdocumentation. llvm-svn: 368959
1 parent 4ed5521 commit a7d4cec

File tree

3 files changed

+25
-32
lines changed

3 files changed

+25
-32
lines changed

lldb/include/lldb/Utility/ConstString.h

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,7 @@ class ConstString {
204204
/// \param[in] rhs
205205
/// Another string object to compare this object to.
206206
///
207-
/// \return
208-
/// \li \b true if this object is not equal to \a rhs.
209-
/// \li \b false if this object is equal to \a rhs.
207+
/// \return \b true if this object is not equal to \a rhs, false otherwise.
210208
bool operator!=(const char *rhs) const { return !(*this == rhs); }
211209

212210
bool operator<(ConstString rhs) const;
@@ -218,8 +216,7 @@ class ConstString {
218216
///
219217
/// If \a value_if_empty is nullptr, then nullptr will be returned.
220218
///
221-
/// \return
222-
/// Returns \a value_if_empty if the string is empty, otherwise
219+
/// \return Returns \a value_if_empty if the string is empty, otherwise
223220
/// the C string value contained in this object.
224221
const char *AsCString(const char *value_if_empty = nullptr) const {
225222
return (IsEmpty() ? value_if_empty : m_string);
@@ -269,7 +266,7 @@ class ConstString {
269266
/// in a pointer comparison since all strings are in a uniqued in a global
270267
/// string pool.
271268
///
272-
/// \param[in] rhs
269+
/// \param[in] lhs
273270
/// The Left Hand Side const ConstString object reference.
274271
///
275272
/// \param[in] rhs
@@ -279,9 +276,7 @@ class ConstString {
279276
/// Case sensitivity. If true, case sensitive equality
280277
/// will be tested, otherwise character case will be ignored
281278
///
282-
/// \return
283-
/// \li \b true if this object is equal to \a rhs.
284-
/// \li \b false if this object is not equal to \a rhs.
279+
/// \return \b true if this object is equal to \a rhs, \b false otherwise.
285280
static bool Equals(ConstString lhs, ConstString rhs,
286281
const bool case_sensitive = true);
287282

@@ -305,10 +300,7 @@ class ConstString {
305300
/// Case sensitivity of compare. If true, case sensitive compare
306301
/// will be performed, otherwise character case will be ignored
307302
///
308-
/// \return
309-
/// \li -1 if lhs < rhs
310-
/// \li 0 if lhs == rhs
311-
/// \li 1 if lhs > rhs
303+
/// \return -1 if lhs < rhs, 0 if lhs == rhs, 1 if lhs > rhs
312304
static int Compare(ConstString lhs, ConstString rhs,
313305
const bool case_sensitive = true);
314306

lldb/include/lldb/Utility/FileSpec.h

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class FileSpec {
7373
/// \see FileSpec::SetFile (const char *path)
7474
explicit FileSpec(llvm::StringRef path, Style style = Style::native);
7575

76-
explicit FileSpec(llvm::StringRef path, const llvm::Triple &Triple);
76+
explicit FileSpec(llvm::StringRef path, const llvm::Triple &triple);
7777

7878
/// Copy constructor
7979
///
@@ -200,10 +200,8 @@ class FileSpec {
200200
/// only the filename will be compared, else a full comparison
201201
/// is done.
202202
///
203-
/// \return
204-
/// \li -1 if \a lhs is less than \a rhs
205-
/// \li 0 if \a lhs is equal to \a rhs
206-
/// \li 1 if \a lhs is greater than \a rhs
203+
/// \return -1 if \a lhs is less than \a rhs, 0 if \a lhs is equal to \a rhs,
204+
/// 1 if \a lhs is greater than \a rhs
207205
static int Compare(const FileSpec &lhs, const FileSpec &rhs, bool full);
208206

209207
static bool Equal(const FileSpec &a, const FileSpec &b, bool full);
@@ -322,10 +320,6 @@ class FileSpec {
322320
/// Extract the full path to the file.
323321
///
324322
/// Extract the directory and path into an llvm::SmallVectorImpl<>
325-
///
326-
/// \return
327-
/// Returns a std::string with the directory and filename
328-
/// concatenated.
329323
void GetPath(llvm::SmallVectorImpl<char> &path,
330324
bool denormalize = true) const;
331325

@@ -336,8 +330,7 @@ class FileSpec {
336330
/// filename has no extension, ConstString(nullptr) is returned. The dot
337331
/// ('.') character is not returned as part of the extension
338332
///
339-
/// \return
340-
/// Returns the extension of the file as a ConstString object.
333+
/// \return Returns the extension of the file as a ConstString object.
341334
ConstString GetFileNameExtension() const;
342335

343336
/// Return the filename without the extension part
@@ -346,9 +339,7 @@ class FileSpec {
346339
/// without the extension part (e.g. for a file named "foo.bar", "foo" is
347340
/// returned)
348341
///
349-
/// \return
350-
/// Returns the filename without extension
351-
/// as a ConstString object.
342+
/// \return Returns the filename without extension as a ConstString object.
352343
ConstString GetFileNameStrippingExtension() const;
353344

354345
/// Get the memory cost of this object.
@@ -372,12 +363,22 @@ class FileSpec {
372363
/// \param[in] path
373364
/// A full, partial, or relative path to a file.
374365
///
375-
/// \param[in] resolve_path
376-
/// If \b true, then we will try to resolve links the path using
377-
/// the static FileSpec::Resolve.
366+
/// \param[in] style
367+
/// The style for the given path.
378368
void SetFile(llvm::StringRef path, Style style);
379369

380-
void SetFile(llvm::StringRef path, const llvm::Triple &Triple);
370+
/// Change the file specified with a new path.
371+
///
372+
/// Update the contents of this object with a new path. The path will be
373+
/// split up into a directory and filename and stored as uniqued string
374+
/// values for quick comparison and efficient memory usage.
375+
///
376+
/// \param[in] path
377+
/// A full, partial, or relative path to a file.
378+
///
379+
/// \param[in] triple
380+
/// The triple which is used to set the Path style.
381+
void SetFile(llvm::StringRef path, const llvm::Triple &triple);
381382

382383
bool IsResolved() const { return m_is_resolved; }
383384

lldb/source/Utility/FileSpec.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ FileSpec::FileSpec(llvm::StringRef path, Style style) : m_style(style) {
7272
SetFile(path, style);
7373
}
7474

75-
FileSpec::FileSpec(llvm::StringRef path, const llvm::Triple &Triple)
75+
FileSpec::FileSpec(llvm::StringRef path, const llvm::Triple &triple)
7676
: FileSpec{path, Triple.isOSWindows() ? Style::windows : Style::posix} {}
7777

7878
// Copy constructor

0 commit comments

Comments
 (0)