From a00b80b04c5edb08639c1c6b32e9231fd8b066f7 Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Thu, 23 Aug 2012 16:54:08 +0000 Subject: [PATCH] Fix a bunch of -Wdocumentation warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162446 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/APInt.h | 20 ++++++++-------- include/llvm/ADT/SparseSet.h | 6 ++--- include/llvm/Bitcode/Archive.h | 8 +++---- include/llvm/CodeGen/PBQP/HeuristicBase.h | 2 +- include/llvm/DIBuilder.h | 28 ++++++++++++----------- include/llvm/InstrTypes.h | 4 ++-- include/llvm/MC/MCExpr.h | 4 ++-- include/llvm/MC/MCStreamer.h | 3 --- include/llvm/Support/DataExtractor.h | 4 ++-- include/llvm/Support/PathV1.h | 4 ++-- include/llvm/Support/PathV2.h | 2 +- include/llvm/Support/SourceMgr.h | 2 +- include/llvm/Support/TimeValue.h | 6 ++--- lib/MC/MCAsmStreamer.cpp | 2 +- utils/TableGen/SequenceToOffsetTable.h | 4 ++-- utils/TableGen/X86RecognizableInstr.h | 2 +- 16 files changed, 49 insertions(+), 52 deletions(-) diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h index f30a6e3f081..7f20e3356a0 100644 --- a/include/llvm/ADT/APInt.h +++ b/include/llvm/ADT/APInt.h @@ -1238,8 +1238,8 @@ public: /// countLeadingZeros - This function is an APInt version of the /// countLeadingZeros_{32,64} functions in MathExtras.h. It counts the number /// of zeros from the most significant bit to the first one bit. - /// @returns BitWidth if the value is zero. - /// @returns the number of zeros from the most significant bit to the first + /// @returns BitWidth if the value is zero, otherwise + /// returns the number of zeros from the most significant bit to the first /// one bits. unsigned countLeadingZeros() const { if (isSingleWord()) { @@ -1252,8 +1252,8 @@ public: /// countLeadingOnes - This function is an APInt version of the /// countLeadingOnes_{32,64} functions in MathExtras.h. It counts the number /// of ones from the most significant bit to the first zero bit. - /// @returns 0 if the high order bit is not set - /// @returns the number of 1 bits from the most significant to the least + /// @returns 0 if the high order bit is not set, otherwise + /// returns the number of 1 bits from the most significant to the least /// @brief Count the number of leading one bits. unsigned countLeadingOnes() const; @@ -1266,8 +1266,8 @@ public: /// countTrailingZeros - This function is an APInt version of the /// countTrailingZeros_{32,64} functions in MathExtras.h. It counts /// the number of zeros from the least significant bit to the first set bit. - /// @returns BitWidth if the value is zero. - /// @returns the number of zeros from the least significant bit to the first + /// @returns BitWidth if the value is zero, otherwise + /// returns the number of zeros from the least significant bit to the first /// one bit. /// @brief Count the number of trailing zero bits. unsigned countTrailingZeros() const; @@ -1275,8 +1275,8 @@ public: /// countTrailingOnes - This function is an APInt version of the /// countTrailingOnes_{32,64} functions in MathExtras.h. It counts /// the number of ones from the least significant bit to the first zero bit. - /// @returns BitWidth if the value is all ones. - /// @returns the number of ones from the least significant bit to the first + /// @returns BitWidth if the value is all ones, otherwise + /// returns the number of ones from the least significant bit to the first /// zero bit. /// @brief Count the number of trailing one bits. unsigned countTrailingOnes() const { @@ -1288,8 +1288,8 @@ public: /// countPopulation - This function is an APInt version of the /// countPopulation_{32,64} functions in MathExtras.h. It counts the number /// of 1 bits in the APInt value. - /// @returns 0 if the value is zero. - /// @returns the number of set bits. + /// @returns 0 if the value is zero, otherwise returns the number of set + /// bits. /// @brief Count the number of bits set. unsigned countPopulation() const { if (isSingleWord()) diff --git a/include/llvm/ADT/SparseSet.h b/include/llvm/ADT/SparseSet.h index 55696333489..dc3db4ce1f3 100644 --- a/include/llvm/ADT/SparseSet.h +++ b/include/llvm/ADT/SparseSet.h @@ -110,9 +110,9 @@ struct SparseSetValFunctor { /// For sets that may grow to thousands of elements, SparseT should be set to /// uint16_t or uint32_t. /// -/// @param ValueT The type of objects in the set. -/// @param KeyFunctorT A functor that computes an unsigned index from KeyT. -/// @param SparseT An unsigned integer type. See above. +/// @tparam ValueT The type of objects in the set. +/// @tparam KeyFunctorT A functor that computes an unsigned index from KeyT. +/// @tparam SparseT An unsigned integer type. See above. /// template, diff --git a/include/llvm/Bitcode/Archive.h b/include/llvm/Bitcode/Archive.h index 3c75e5882db..c1c3ec044ba 100644 --- a/include/llvm/Bitcode/Archive.h +++ b/include/llvm/Bitcode/Archive.h @@ -415,8 +415,8 @@ class Archive { /// name will be truncated at 15 characters. If \p Compress is specified, /// all archive members will be compressed before being written. If /// \p PrintSymTab is true, the symbol table will be printed to std::cout. - /// @returns true if an error occurred, \p error set to error message - /// @returns false if the writing succeeded. + /// @returns true if an error occurred, \p error set to error message; + /// returns false if the writing succeeded. /// @brief Write (possibly modified) archive contents to disk bool writeToDisk( bool CreateSymbolTable=false, ///< Create Symbol table @@ -480,8 +480,8 @@ class Archive { /// Writes one ArchiveMember to an ofstream. If an error occurs, returns /// false, otherwise true. If an error occurs and error is non-null then /// it will be set to an error message. - /// @returns false Writing member succeeded - /// @returns true Writing member failed, \p error set to error message + /// @returns false if writing member succeeded, + /// returns true if writing member failed, \p error set to error message. bool writeMember( const ArchiveMember& member, ///< The member to be written std::ofstream& ARFile, ///< The file to write member onto diff --git a/include/llvm/CodeGen/PBQP/HeuristicBase.h b/include/llvm/CodeGen/PBQP/HeuristicBase.h index 3fee18cc42d..700c831edf3 100644 --- a/include/llvm/CodeGen/PBQP/HeuristicBase.h +++ b/include/llvm/CodeGen/PBQP/HeuristicBase.h @@ -113,7 +113,7 @@ namespace PBQP { } /// \brief Add the given node to the list of nodes to be optimally reduced. - /// @return nItr Node iterator to be added. + /// @param nItr Node iterator to be added. /// /// You probably don't want to over-ride this, except perhaps to record /// statistics before calling this implementation. HeuristicBase relies on diff --git a/include/llvm/DIBuilder.h b/include/llvm/DIBuilder.h index 2ed48a944e9..dd4ea96ae25 100644 --- a/include/llvm/DIBuilder.h +++ b/include/llvm/DIBuilder.h @@ -179,8 +179,10 @@ namespace llvm { /// @param Ty Parent type. /// @param PropertyName Name of the Objective C property associated with /// this ivar. - /// @param GetterName Name of the Objective C property getter selector. - /// @param SetterName Name of the Objective C property setter selector. + /// @param PropertyGetterName Name of the Objective C property getter + /// selector. + /// @param PropertySetterName Name of the Objective C property setter + /// selector. /// @param PropertyAttributes Objective C property attributes. DIType createObjCIVar(StringRef Name, DIFile File, unsigned LineNo, uint64_t SizeInBits, @@ -201,7 +203,7 @@ namespace llvm { /// @param OffsetInBits Member offset. /// @param Flags Flags to encode member attribute, e.g. private /// @param Ty Parent type. - /// @param Property Property associated with this ivar. + /// @param PropertyNode Property associated with this ivar. DIType createObjCIVar(StringRef Name, DIFile File, unsigned LineNo, uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, @@ -228,7 +230,7 @@ namespace llvm { /// @param Scope Scope in which this class is defined. /// @param Name class name. /// @param File File where this member is defined. - /// @param LineNo Line number. + /// @param LineNumber Line number. /// @param SizeInBits Member size. /// @param AlignInBits Member alignment. /// @param OffsetInBits Member offset. @@ -250,7 +252,7 @@ namespace llvm { /// @param Scope Scope in which this struct is defined. /// @param Name Struct name. /// @param File File where this member is defined. - /// @param LineNo Line number. + /// @param LineNumber Line number. /// @param SizeInBits Member size. /// @param AlignInBits Member alignment. /// @param Flags Flags to encode member attribute, e.g. private @@ -265,7 +267,7 @@ namespace llvm { /// @param Scope Scope in which this union is defined. /// @param Name Union name. /// @param File File where this member is defined. - /// @param LineNo Line number. + /// @param LineNumber Line number. /// @param SizeInBits Member size. /// @param AlignInBits Member alignment. /// @param Flags Flags to encode member attribute, e.g. private @@ -325,7 +327,7 @@ namespace llvm { /// @param Scope Scope in which this enumeration is defined. /// @param Name Union name. /// @param File File where this member is defined. - /// @param LineNo Line number. + /// @param LineNumber Line number. /// @param SizeInBits Member size. /// @param AlignInBits Member alignment. /// @param Elements Enumeration elements. @@ -337,9 +339,9 @@ namespace llvm { unsigned Flags); /// createSubroutineType - Create subroutine type. - /// @param File File in which this subroutine is defined. - /// @param ParamterTypes An array of subroutine parameter types. This - /// includes return type at 0th index. + /// @param File File in which this subroutine is defined. + /// @param ParameterTypes An array of subroutine parameter types. This + /// includes return type at 0th index. DIType createSubroutineType(DIFile File, DIArray ParameterTypes); /// createArtificialType - Create a new DIType with "artificial" flag set. @@ -383,9 +385,9 @@ namespace llvm { /// createStaticVariable - Create a new descriptor for the specified /// variable. - /// @param Conext Variable scope. + /// @param Context Variable scope. /// @param Name Name of the variable. - /// @param LinakgeName Mangled name of the variable. + /// @param LinkageName Mangled name of the variable. /// @param File File where this variable is defined. /// @param LineNo Line number. /// @param Ty Variable Type. @@ -426,7 +428,7 @@ namespace llvm { /// DW_TAG_arg_variable. /// @param Scope Variable scope. /// @param Name Variable name. - /// @param File File where this variable is defined. + /// @param F File where this variable is defined. /// @param LineNo Line number. /// @param Ty Variable Type /// @param Addr An array of complex address operations. diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index 2529f24fe99..6291a6d9884 100644 --- a/include/llvm/InstrTypes.h +++ b/include/llvm/InstrTypes.h @@ -581,8 +581,8 @@ public: /// Determine how a pair of casts can be eliminated, if they can be at all. /// This is a helper function for both CastInst and ConstantExpr. - /// @returns 0 if the CastInst pair can't be eliminated - /// @returns Instruction::CastOps value for a cast that can replace + /// @returns 0 if the CastInst pair can't be eliminated, otherwise + /// returns Instruction::CastOps value for a cast that can replace /// the pair, casting SrcTy to DstTy. /// @brief Determine if a cast pair is eliminable static unsigned isEliminableCastPair( diff --git a/include/llvm/MC/MCExpr.h b/include/llvm/MC/MCExpr.h index aa62eb2b16c..ad65cba7826 100644 --- a/include/llvm/MC/MCExpr.h +++ b/include/llvm/MC/MCExpr.h @@ -78,11 +78,11 @@ public: /// values. If not given, then only non-symbolic expressions will be /// evaluated. /// @result - True on success. + bool EvaluateAsAbsolute(int64_t &Res, const MCAsmLayout &Layout, + const SectionAddrMap &Addrs) const; bool EvaluateAsAbsolute(int64_t &Res) const; bool EvaluateAsAbsolute(int64_t &Res, const MCAssembler &Asm) const; bool EvaluateAsAbsolute(int64_t &Res, const MCAsmLayout &Layout) const; - bool EvaluateAsAbsolute(int64_t &Res, const MCAsmLayout &Layout, - const SectionAddrMap &Addrs) const; /// EvaluateAsRelocatable - Try to evaluate the expression to a relocatable /// value, i.e. an expression of the fixed form (a - b + constant). diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h index e8c3e59fac8..935f0cdaaad 100644 --- a/include/llvm/MC/MCStreamer.h +++ b/include/llvm/MC/MCStreamer.h @@ -581,9 +581,6 @@ namespace llvm { /// /// \param ShowInst - Whether to show the MCInst representation inline with /// the assembly. - /// - /// \param DecodeLSDA - If true, emit comments that translates the LSDA into a - /// human readable format. Only usable with CFI. MCStreamer *createAsmStreamer(MCContext &Ctx, formatted_raw_ostream &OS, bool isVerboseAsm, bool useLoc, diff --git a/include/llvm/Support/DataExtractor.h b/include/llvm/Support/DataExtractor.h index 506ec96930d..8d880fd5e8b 100644 --- a/include/llvm/Support/DataExtractor.h +++ b/include/llvm/Support/DataExtractor.h @@ -99,8 +99,8 @@ public: /// enough bytes to extract this value, the offset will be left /// unmodified. /// - /// @param[in] byte_size - /// The size in byte of the integer to extract. + /// @param[in] size + /// The size in bytes of the integer to extract. /// /// @return /// The sign extended signed integer value that was extracted, diff --git a/include/llvm/Support/PathV1.h b/include/llvm/Support/PathV1.h index f4bedf92c44..643ee8c6c1d 100644 --- a/include/llvm/Support/PathV1.h +++ b/include/llvm/Support/PathV1.h @@ -683,8 +683,8 @@ namespace sys { /// This function returns status information about the file. The type of /// path (file or directory) is updated to reflect the actual contents /// of the file system. - /// @returns 0 on failure, with Error explaining why (if non-zero) - /// @returns a pointer to a FileStatus structure on success. + /// @returns 0 on failure, with Error explaining why (if non-zero), + /// otherwise returns a pointer to a FileStatus structure on success. /// @brief Get file status. const FileStatus *getFileStatus( bool forceUpdate = false, ///< Force an update from the file system diff --git a/include/llvm/Support/PathV2.h b/include/llvm/Support/PathV2.h index 887b6df2d89..967ea1e1d13 100644 --- a/include/llvm/Support/PathV2.h +++ b/include/llvm/Support/PathV2.h @@ -133,7 +133,7 @@ void replace_extension(SmallVectorImpl &path, const Twine &extension); /// foo + bar/f => foo/bar/f /// /// @param path Set to \a path + \a component. -/// @param component The component to be appended to \a path. +/// @param a The component to be appended to \a path. void append(SmallVectorImpl &path, const Twine &a, const Twine &b = "", const Twine &c = "", diff --git a/include/llvm/Support/SourceMgr.h b/include/llvm/Support/SourceMgr.h index 8949a3a908f..3835e845929 100644 --- a/include/llvm/Support/SourceMgr.h +++ b/include/llvm/Support/SourceMgr.h @@ -145,7 +145,7 @@ public: /// GetMessage - Return an SMDiagnostic at the specified location with the /// specified string. /// - /// @param Type - If non-null, the kind of message (e.g., "error") which is + /// @param Msg If non-null, the kind of message (e.g., "error") which is /// prefixed to the message. SMDiagnostic GetMessage(SMLoc Loc, DiagKind Kind, const Twine &Msg, ArrayRef Ranges = ArrayRef()) const; diff --git a/include/llvm/Support/TimeValue.h b/include/llvm/Support/TimeValue.h index 5fba9023593..e780b50c603 100644 --- a/include/llvm/Support/TimeValue.h +++ b/include/llvm/Support/TimeValue.h @@ -153,7 +153,6 @@ namespace sys { /// Determine if \p this is greater than or equal to \p that. /// @returns True iff *this >= that. - /// @brief True if this >= that. int operator >= (const TimeValue &that) const { if ( this->seconds_ > that.seconds_ ) { return 1; @@ -164,7 +163,7 @@ namespace sys { } /// Determines if two TimeValue objects represent the same moment in time. - /// @brief True iff *this == that. + /// @returns True iff *this == that. int operator == (const TimeValue &that) const { return (this->seconds_ == that.seconds_) && (this->nanos_ == that.nanos_); @@ -172,8 +171,7 @@ namespace sys { /// Determines if two TimeValue objects represent times that are not the /// same. - /// @return True iff *this != that. - /// @brief True if this != that. + /// @returns True iff *this != that. int operator != (const TimeValue &that) const { return !(*this == that); } /// Adds two TimeValue objects together. diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index 373df4b2bf7..394f049ca4a 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -166,7 +166,7 @@ public: /// /// @param Symbol - The common symbol to emit. /// @param Size - The size of the common symbol. - /// @param Size - The alignment of the common symbol in bytes. + /// @param ByteAlignment - The alignment of the common symbol in bytes. virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment); diff --git a/utils/TableGen/SequenceToOffsetTable.h b/utils/TableGen/SequenceToOffsetTable.h index d8ab2eeb258..60202b5ade0 100644 --- a/utils/TableGen/SequenceToOffsetTable.h +++ b/utils/TableGen/SequenceToOffsetTable.h @@ -29,8 +29,8 @@ namespace llvm { /// Compute the layout of a table that contains all the sequences, possibly by /// reusing entries. /// -/// @param SeqT The sequence container. (vector or string). -/// @param Less A stable comparator for SeqT elements. +/// @tparam SeqT The sequence container. (vector or string). +/// @tparam Less A stable comparator for SeqT elements. template > class SequenceToOffsetTable { typedef typename SeqT::value_type ElemT; diff --git a/utils/TableGen/X86RecognizableInstr.h b/utils/TableGen/X86RecognizableInstr.h index 542e510c603..e0bb2e24e23 100644 --- a/utils/TableGen/X86RecognizableInstr.h +++ b/utils/TableGen/X86RecognizableInstr.h @@ -143,7 +143,7 @@ private: /// @param hasREX_WPrefix - Indicates whether the instruction has a REX.W /// prefix. If it does, 32-bit register operands stay /// 32-bit regardless of the operand size. - /// @param hasOpSizePrefix- Indicates whether the instruction has an OpSize + /// @param hasOpSizePrefix Indicates whether the instruction has an OpSize /// prefix. If it does not, then 16-bit register /// operands stay 16-bit. /// @return - The operand's type. -- 2.34.1