From 647be32c6048e24f90f470c557e850597e5526c3 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Wed, 9 May 2018 01:00:01 +0000 Subject: Remove \brief commands from doxygen comments. This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331834 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/Diagnostic.h | 244 +++++++++++++++++++-------------------- 1 file changed, 122 insertions(+), 122 deletions(-) (limited to 'include/clang/Basic/Diagnostic.h') diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h index 8bf0fd1140..5205b4c210 100644 --- a/include/clang/Basic/Diagnostic.h +++ b/include/clang/Basic/Diagnostic.h @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // /// \file -/// \brief Defines the Diagnostic-related interfaces. +/// Defines the Diagnostic-related interfaces. // //===----------------------------------------------------------------------===// @@ -54,7 +54,7 @@ enum TokenKind : unsigned short; } // namespace tok -/// \brief Annotates a diagnostic with some code that should be +/// Annotates a diagnostic with some code that should be /// inserted, removed, or replaced to fix the problem. /// /// This kind of hint should be used when we are certain that the @@ -65,21 +65,21 @@ enum TokenKind : unsigned short; /// compilation. class FixItHint { public: - /// \brief Code that should be replaced to correct the error. Empty for an + /// Code that should be replaced to correct the error. Empty for an /// insertion hint. CharSourceRange RemoveRange; - /// \brief Code in the specific range that should be inserted in the insertion + /// Code in the specific range that should be inserted in the insertion /// location. CharSourceRange InsertFromRange; - /// \brief The actual code to insert at the insertion location, as a + /// The actual code to insert at the insertion location, as a /// string. std::string CodeToInsert; bool BeforePreviousInsertions = false; - /// \brief Empty code modification hint, indicating that no code + /// Empty code modification hint, indicating that no code /// modification is known. FixItHint() = default; @@ -87,7 +87,7 @@ public: return !RemoveRange.isValid(); } - /// \brief Create a code modification hint that inserts the given + /// Create a code modification hint that inserts the given /// code string at a specific location. static FixItHint CreateInsertion(SourceLocation InsertionLoc, StringRef Code, @@ -100,7 +100,7 @@ public: return Hint; } - /// \brief Create a code modification hint that inserts the given + /// Create a code modification hint that inserts the given /// code from \p FromRange at a specific location. static FixItHint CreateInsertionFromRange(SourceLocation InsertionLoc, CharSourceRange FromRange, @@ -113,7 +113,7 @@ public: return Hint; } - /// \brief Create a code modification hint that removes the given + /// Create a code modification hint that removes the given /// source range. static FixItHint CreateRemoval(CharSourceRange RemoveRange) { FixItHint Hint; @@ -124,7 +124,7 @@ public: return CreateRemoval(CharSourceRange::getTokenRange(RemoveRange)); } - /// \brief Create a code modification hint that replaces the given + /// Create a code modification hint that replaces the given /// source range with the given code string. static FixItHint CreateReplacement(CharSourceRange RemoveRange, StringRef Code) { @@ -140,7 +140,7 @@ public: } }; -/// \brief Concrete class used by the front-end to report problems and issues. +/// Concrete class used by the front-end to report problems and issues. /// /// This massages the diagnostics (e.g. handling things like "report warnings /// as errors" and passes them off to the DiagnosticConsumer for reporting to @@ -148,7 +148,7 @@ public: /// SourceManager. class DiagnosticsEngine : public RefCountedBase { public: - /// \brief The level of the diagnostic, after it has been through mapping. + /// The level of the diagnostic, after it has been through mapping. enum Level { Ignored = DiagnosticIDs::Ignored, Note = DiagnosticIDs::Note, @@ -199,7 +199,7 @@ public: ak_attr }; - /// \brief Represents on argument value, which is a union discriminated + /// Represents on argument value, which is a union discriminated /// by ArgumentKind, with a value. using ArgumentValue = std::pair; @@ -240,7 +240,7 @@ private: std::unique_ptr Owner; SourceManager *SourceMgr = nullptr; - /// \brief Mapping information for diagnostics. + /// Mapping information for diagnostics. /// /// Mapping info is packed into four bits per diagnostic. The low three /// bits are the mapping (an instance of diag::Severity), or zero if unset. @@ -298,7 +298,7 @@ private: const_iterator end() const { return DiagMap.end(); } }; - /// \brief Keeps and automatically disposes all DiagStates that we create. + /// Keeps and automatically disposes all DiagStates that we create. std::list DiagStates; /// A mapping from files to the diagnostic states for those files. Lazily @@ -338,7 +338,7 @@ private: friend class ASTReader; friend class ASTWriter; - /// \brief Represents a point in source where the diagnostic state was + /// Represents a point in source where the diagnostic state was /// modified because of a pragma. /// /// 'Loc' can be null if the point represents the diagnostic state @@ -391,7 +391,7 @@ private: DiagStateMap DiagStatesByLoc; - /// \brief Keeps the DiagState that was active during each diagnostic 'push' + /// Keeps the DiagState that was active during each diagnostic 'push' /// so we can get back at it when we 'pop'. std::vector DiagStateOnPushStack; @@ -401,32 +401,32 @@ private: void PushDiagStatePoint(DiagState *State, SourceLocation L); - /// \brief Finds the DiagStatePoint that contains the diagnostic state of + /// Finds the DiagStatePoint that contains the diagnostic state of /// the given source location. DiagState *GetDiagStateForLoc(SourceLocation Loc) const { return SourceMgr ? DiagStatesByLoc.lookup(*SourceMgr, Loc) : DiagStatesByLoc.getCurDiagState(); } - /// \brief Sticky flag set to \c true when an error is emitted. + /// Sticky flag set to \c true when an error is emitted. bool ErrorOccurred; - /// \brief Sticky flag set to \c true when an "uncompilable error" occurs. + /// Sticky flag set to \c true when an "uncompilable error" occurs. /// I.e. an error that was not upgraded from a warning by -Werror. bool UncompilableErrorOccurred; - /// \brief Sticky flag set to \c true when a fatal error is emitted. + /// Sticky flag set to \c true when a fatal error is emitted. bool FatalErrorOccurred; - /// \brief Indicates that an unrecoverable error has occurred. + /// Indicates that an unrecoverable error has occurred. bool UnrecoverableErrorOccurred; - /// \brief Counts for DiagnosticErrorTrap to check whether an error occurred + /// Counts for DiagnosticErrorTrap to check whether an error occurred /// during a parsing section, e.g. during parsing a function. unsigned TrapNumErrorsOccurred; unsigned TrapNumUnrecoverableErrorsOccurred; - /// \brief The level of the last diagnostic emitted. + /// The level of the last diagnostic emitted. /// /// This is used to emit continuation diagnostics with the same level as the /// diagnostic that they follow. @@ -438,7 +438,7 @@ private: /// Number of errors reported unsigned NumErrors; - /// \brief A function pointer that converts an opaque diagnostic + /// A function pointer that converts an opaque diagnostic /// argument to a strings. /// /// This takes the modifiers and argument that was present in the diagnostic. @@ -459,18 +459,18 @@ private: void *ArgToStringCookie = nullptr; ArgToStringFnTy ArgToStringFn; - /// \brief ID of the "delayed" diagnostic, which is a (typically + /// ID of the "delayed" diagnostic, which is a (typically /// fatal) diagnostic that had to be delayed because it was found /// while emitting another diagnostic. unsigned DelayedDiagID; - /// \brief First string argument for the delayed diagnostic. + /// First string argument for the delayed diagnostic. std::string DelayedDiagArg1; - /// \brief Second string argument for the delayed diagnostic. + /// Second string argument for the delayed diagnostic. std::string DelayedDiagArg2; - /// \brief Optional flag value. + /// Optional flag value. /// /// Some flags accept values, for instance: -Wframe-larger-than= and /// -Rpass=. The content of this string is emitted after the flag name @@ -495,12 +495,12 @@ public: return Diags; } - /// \brief Retrieve the diagnostic options. + /// Retrieve the diagnostic options. DiagnosticOptions &getDiagnosticOptions() const { return *DiagOpts; } using diag_mapping_range = llvm::iterator_range; - /// \brief Get the current set of diagnostic mappings. + /// Get the current set of diagnostic mappings. diag_mapping_range getDiagnosticMappings() const { const DiagState &DS = *GetCurDiagState(); return diag_mapping_range(DS.begin(), DS.end()); @@ -509,10 +509,10 @@ public: DiagnosticConsumer *getClient() { return Client; } const DiagnosticConsumer *getClient() const { return Client; } - /// \brief Determine whether this \c DiagnosticsEngine object own its client. + /// Determine whether this \c DiagnosticsEngine object own its client. bool ownsClient() const { return Owner != nullptr; } - /// \brief Return the current diagnostic client along with ownership of that + /// Return the current diagnostic client along with ownership of that /// client. std::unique_ptr takeClient() { return std::move(Owner); } @@ -534,54 +534,54 @@ public: // how diagnostics are emitted. // - /// \brief Copies the current DiagMappings and pushes the new copy + /// Copies the current DiagMappings and pushes the new copy /// onto the top of the stack. void pushMappings(SourceLocation Loc); - /// \brief Pops the current DiagMappings off the top of the stack, + /// Pops the current DiagMappings off the top of the stack, /// causing the new top of the stack to be the active mappings. /// /// \returns \c true if the pop happens, \c false if there is only one /// DiagMapping on the stack. bool popMappings(SourceLocation Loc); - /// \brief Set the diagnostic client associated with this diagnostic object. + /// Set the diagnostic client associated with this diagnostic object. /// /// \param ShouldOwnClient true if the diagnostic object should take /// ownership of \c client. void setClient(DiagnosticConsumer *client, bool ShouldOwnClient = true); - /// \brief Specify a limit for the number of errors we should + /// Specify a limit for the number of errors we should /// emit before giving up. /// /// Zero disables the limit. void setErrorLimit(unsigned Limit) { ErrorLimit = Limit; } - /// \brief Specify the maximum number of template instantiation + /// Specify the maximum number of template instantiation /// notes to emit along with a given diagnostic. void setTemplateBacktraceLimit(unsigned Limit) { TemplateBacktraceLimit = Limit; } - /// \brief Retrieve the maximum number of template instantiation + /// Retrieve the maximum number of template instantiation /// notes to emit along with a given diagnostic. unsigned getTemplateBacktraceLimit() const { return TemplateBacktraceLimit; } - /// \brief Specify the maximum number of constexpr evaluation + /// Specify the maximum number of constexpr evaluation /// notes to emit along with a given diagnostic. void setConstexprBacktraceLimit(unsigned Limit) { ConstexprBacktraceLimit = Limit; } - /// \brief Retrieve the maximum number of constexpr evaluation + /// Retrieve the maximum number of constexpr evaluation /// notes to emit along with a given diagnostic. unsigned getConstexprBacktraceLimit() const { return ConstexprBacktraceLimit; } - /// \brief When set to true, any unmapped warnings are ignored. + /// When set to true, any unmapped warnings are ignored. /// /// If this and WarningsAsErrors are both set, then this one wins. void setIgnoreAllWarnings(bool Val) { @@ -591,7 +591,7 @@ public: return GetCurDiagState()->IgnoreAllWarnings; } - /// \brief When set to true, any unmapped ignored warnings are no longer + /// When set to true, any unmapped ignored warnings are no longer /// ignored. /// /// If this and IgnoreAllWarnings are both set, then that one wins. @@ -602,7 +602,7 @@ public: return GetCurDiagState()->EnableAllWarnings; } - /// \brief When set to true, any warnings reported are issued as errors. + /// When set to true, any warnings reported are issued as errors. void setWarningsAsErrors(bool Val) { GetCurDiagState()->WarningsAsErrors = Val; } @@ -610,15 +610,15 @@ public: return GetCurDiagState()->WarningsAsErrors; } - /// \brief When set to true, any error reported is made a fatal error. + /// When set to true, any error reported is made a fatal error. void setErrorsAsFatal(bool Val) { GetCurDiagState()->ErrorsAsFatal = Val; } bool getErrorsAsFatal() const { return GetCurDiagState()->ErrorsAsFatal; } - /// \brief When set to true (the default), suppress further diagnostics after + /// When set to true (the default), suppress further diagnostics after /// a fatal error. void setSuppressAfterFatalError(bool Val) { SuppressAfterFatalError = Val; } - /// \brief When set to true mask warnings that come from system headers. + /// When set to true mask warnings that come from system headers. void setSuppressSystemWarnings(bool Val) { GetCurDiagState()->SuppressSystemWarnings = Val; } @@ -626,7 +626,7 @@ public: return GetCurDiagState()->SuppressSystemWarnings; } - /// \brief Suppress all diagnostics, to silence the front end when we + /// Suppress all diagnostics, to silence the front end when we /// know that we don't want any more diagnostics to be passed along to the /// client void setSuppressAllDiagnostics(bool Val = true) { @@ -634,22 +634,22 @@ public: } bool getSuppressAllDiagnostics() const { return SuppressAllDiagnostics; } - /// \brief Set type eliding, to skip outputting same types occurring in + /// Set type eliding, to skip outputting same types occurring in /// template types. void setElideType(bool Val = true) { ElideType = Val; } bool getElideType() { return ElideType; } - /// \brief Set tree printing, to outputting the template difference in a + /// Set tree printing, to outputting the template difference in a /// tree format. void setPrintTemplateTree(bool Val = false) { PrintTemplateTree = Val; } bool getPrintTemplateTree() { return PrintTemplateTree; } - /// \brief Set color printing, so the type diffing will inject color markers + /// Set color printing, so the type diffing will inject color markers /// into the output. void setShowColors(bool Val = false) { ShowColors = Val; } bool getShowColors() { return ShowColors; } - /// \brief Specify which overload candidates to show when overload resolution + /// Specify which overload candidates to show when overload resolution /// fails. /// /// By default, we show all candidates. @@ -658,7 +658,7 @@ public: } OverloadsShown getShowOverloads() const { return ShowOverloads; } - /// \brief Pretend that the last diagnostic issued was ignored, so any + /// Pretend that the last diagnostic issued was ignored, so any /// subsequent notes will be suppressed, or restore a prior ignoring /// state after ignoring some diagnostics and their notes, possibly in /// the middle of another diagnostic. @@ -670,14 +670,14 @@ public: LastDiagLevel = Ignored ? DiagnosticIDs::Ignored : DiagnosticIDs::Warning; } - /// \brief Determine whether the previous diagnostic was ignored. This can + /// Determine whether the previous diagnostic was ignored. This can /// be used by clients that want to determine whether notes attached to a /// diagnostic will be suppressed. bool isLastDiagnosticIgnored() const { return LastDiagLevel == DiagnosticIDs::Ignored; } - /// \brief Controls whether otherwise-unmapped extension diagnostics are + /// Controls whether otherwise-unmapped extension diagnostics are /// mapped onto ignore/warning/error. /// /// This corresponds to the GCC -pedantic and -pedantic-errors option. @@ -688,7 +688,7 @@ public: return GetCurDiagState()->ExtBehavior; } - /// \brief Counter bumped when an __extension__ block is/ encountered. + /// Counter bumped when an __extension__ block is/ encountered. /// /// When non-zero, all extension diagnostics are entirely silenced, no /// matter how they are mapped. @@ -696,7 +696,7 @@ public: void DecrementAllExtensionsSilenced() { --AllExtensionsSilenced; } bool hasAllExtensionsSilenced() { return AllExtensionsSilenced != 0; } - /// \brief This allows the client to specify that certain warnings are + /// This allows the client to specify that certain warnings are /// ignored. /// /// Notes can never be mapped, errors can only be mapped to fatal, and @@ -706,7 +706,7 @@ public: /// take affect. It can be null if we are setting the latest state. void setSeverity(diag::kind Diag, diag::Severity Map, SourceLocation Loc); - /// \brief Change an entire diagnostic group (e.g. "unknown-pragmas") to + /// Change an entire diagnostic group (e.g. "unknown-pragmas") to /// have the specified mapping. /// /// \returns true (and ignores the request) if "Group" was unknown, false @@ -721,21 +721,21 @@ public: diag::Severity Map, SourceLocation Loc = SourceLocation()); - /// \brief Set the warning-as-error flag for the given diagnostic group. + /// Set the warning-as-error flag for the given diagnostic group. /// /// This function always only operates on the current diagnostic state. /// /// \returns True if the given group is unknown, false otherwise. bool setDiagnosticGroupWarningAsError(StringRef Group, bool Enabled); - /// \brief Set the error-as-fatal flag for the given diagnostic group. + /// Set the error-as-fatal flag for the given diagnostic group. /// /// This function always only operates on the current diagnostic state. /// /// \returns True if the given group is unknown, false otherwise. bool setDiagnosticGroupErrorAsFatal(StringRef Group, bool Enabled); - /// \brief Add the specified mapping to all diagnostics of the specified + /// Add the specified mapping to all diagnostics of the specified /// flavor. /// /// Mainly to be used by -Wno-everything to disable all warnings but allow @@ -745,14 +745,14 @@ public: bool hasErrorOccurred() const { return ErrorOccurred; } - /// \brief Errors that actually prevent compilation, not those that are + /// Errors that actually prevent compilation, not those that are /// upgraded from a warning by -Werror. bool hasUncompilableErrorOccurred() const { return UncompilableErrorOccurred; } bool hasFatalErrorOccurred() const { return FatalErrorOccurred; } - /// \brief Determine whether any kind of unrecoverable error has occurred. + /// Determine whether any kind of unrecoverable error has occurred. bool hasUnrecoverableErrorOccurred() const { return FatalErrorOccurred || UnrecoverableErrorOccurred; } @@ -763,7 +763,7 @@ public: this->NumWarnings = NumWarnings; } - /// \brief Return an ID for a diagnostic with the specified format string and + /// Return an ID for a diagnostic with the specified format string and /// level. /// /// If this is the first request for this diagnostic, it is registered and @@ -777,7 +777,7 @@ public: StringRef(FormatString, N - 1)); } - /// \brief Converts a diagnostic argument (as an intptr_t) into the string + /// Converts a diagnostic argument (as an intptr_t) into the string /// that represents it. void ConvertArgToString(ArgumentKind Kind, intptr_t Val, StringRef Modifier, StringRef Argument, @@ -793,13 +793,13 @@ public: ArgToStringCookie = Cookie; } - /// \brief Note that the prior diagnostic was emitted by some other + /// Note that the prior diagnostic was emitted by some other /// \c DiagnosticsEngine, and we may be attaching a note to that diagnostic. void notePriorDiagnosticFrom(const DiagnosticsEngine &Other) { LastDiagLevel = Other.LastDiagLevel; } - /// \brief Reset the state of the diagnostic object to its initial + /// Reset the state of the diagnostic object to its initial /// configuration. void Reset(); @@ -807,7 +807,7 @@ public: // DiagnosticsEngine classification and reporting interfaces. // - /// \brief Determine whether the diagnostic is known to be ignored. + /// Determine whether the diagnostic is known to be ignored. /// /// This can be used to opportunistically avoid expensive checks when it's /// known for certain that the diagnostic has been suppressed at the @@ -820,7 +820,7 @@ public: diag::Severity::Ignored; } - /// \brief Based on the way the client configured the DiagnosticsEngine + /// Based on the way the client configured the DiagnosticsEngine /// object, classify the specified diagnostic ID into a Level, consumable by /// the DiagnosticConsumer. /// @@ -834,7 +834,7 @@ public: return (Level)Diags->getDiagnosticLevel(DiagID, Loc, *this); } - /// \brief Issue the message to the client. + /// Issue the message to the client. /// /// This actually returns an instance of DiagnosticBuilder which emits the /// diagnostics (through @c ProcessDiag) when it is destroyed. @@ -847,12 +847,12 @@ public: void Report(const StoredDiagnostic &storedDiag); - /// \brief Determine whethere there is already a diagnostic in flight. + /// Determine whethere there is already a diagnostic in flight. bool isDiagnosticInFlight() const { return CurDiagID != std::numeric_limits::max(); } - /// \brief Set the "delayed" diagnostic that will be emitted once + /// Set the "delayed" diagnostic that will be emitted once /// the current diagnostic completes. /// /// If a diagnostic is already in-flight but the front end must @@ -876,10 +876,10 @@ public: void SetDelayedDiagnostic(unsigned DiagID, StringRef Arg1 = "", StringRef Arg2 = ""); - /// \brief Clear out the current diagnostic. + /// Clear out the current diagnostic. void Clear() { CurDiagID = std::numeric_limits::max(); } - /// \brief Return the value associated with this diagnostic flag. + /// Return the value associated with this diagnostic flag. StringRef getFlagValue() const { return FlagValue; } private: @@ -895,20 +895,20 @@ private: friend class DiagnosticIDs; friend class PartialDiagnostic; - /// \brief Report the delayed diagnostic. + /// Report the delayed diagnostic. void ReportDelayed(); - /// \brief The location of the current diagnostic that is in flight. + /// The location of the current diagnostic that is in flight. SourceLocation CurDiagLoc; - /// \brief The ID of the current diagnostic that is in flight. + /// The ID of the current diagnostic that is in flight. /// /// This is set to std::numeric_limits::max() when there is no /// diagnostic in flight. unsigned CurDiagID; enum { - /// \brief The maximum number of arguments we can hold. + /// The maximum number of arguments we can hold. /// /// We currently only support up to 10 arguments (%0-%9). A single /// diagnostic with more than that almost certainly has to be simplified @@ -916,33 +916,33 @@ private: MaxArguments = 10, }; - /// \brief The number of entries in Arguments. + /// The number of entries in Arguments. signed char NumDiagArgs; - /// \brief Specifies whether an argument is in DiagArgumentsStr or + /// Specifies whether an argument is in DiagArgumentsStr or /// in DiagArguments. /// /// This is an array of ArgumentKind::ArgumentKind enum values, one for each /// argument. unsigned char DiagArgumentsKind[MaxArguments]; - /// \brief Holds the values of each string argument for the current + /// Holds the values of each string argument for the current /// diagnostic. /// /// This is only used when the corresponding ArgumentKind is ak_std_string. std::string DiagArgumentsStr[MaxArguments]; - /// \brief The values for the various substitution positions. + /// The values for the various substitution positions. /// /// This is used when the argument is not an std::string. The specific /// value is mangled into an intptr_t and the interpretation depends on /// exactly what sort of argument kind it is. intptr_t DiagArgumentsVal[MaxArguments]; - /// \brief The list of ranges added to this diagnostic. + /// The list of ranges added to this diagnostic. SmallVector DiagRanges; - /// \brief If valid, provides a hint with some code to insert, remove, + /// If valid, provides a hint with some code to insert, remove, /// or modify at a particular position. SmallVector DiagFixItHints; @@ -961,7 +961,7 @@ private: return Mapping; } - /// \brief Used to report a diagnostic that is finally fully formed. + /// Used to report a diagnostic that is finally fully formed. /// /// \returns true if the diagnostic was emitted, false if it was suppressed. bool ProcessDiag() { @@ -980,7 +980,7 @@ protected: // Sema::Diag() patterns. friend class Sema; - /// \brief Emit the current diagnostic and clear the diagnostic state. + /// Emit the current diagnostic and clear the diagnostic state. /// /// \param Force Emit the diagnostic regardless of suppression settings. bool EmitCurrentDiagnostic(bool Force = false); @@ -992,7 +992,7 @@ protected: /// @} }; -/// \brief RAII class that determines when any errors have occurred +/// RAII class that determines when any errors have occurred /// between the time the instance was created and the time it was /// queried. class DiagnosticErrorTrap { @@ -1004,19 +1004,19 @@ public: explicit DiagnosticErrorTrap(DiagnosticsEngine &Diag) : Diag(Diag) { reset(); } - /// \brief Determine whether any errors have occurred since this + /// Determine whether any errors have occurred since this /// object instance was created. bool hasErrorOccurred() const { return Diag.TrapNumErrorsOccurred > NumErrors; } - /// \brief Determine whether any unrecoverable errors have occurred since this + /// Determine whether any unrecoverable errors have occurred since this /// object instance was created. bool hasUnrecoverableErrorOccurred() const { return Diag.TrapNumUnrecoverableErrorsOccurred > NumUnrecoverableErrors; } - /// \brief Set to initial state of "no errors occurred". + /// Set to initial state of "no errors occurred". void reset() { NumErrors = Diag.TrapNumErrorsOccurred; NumUnrecoverableErrors = Diag.TrapNumUnrecoverableErrorsOccurred; @@ -1027,7 +1027,7 @@ public: // DiagnosticBuilder //===----------------------------------------------------------------------===// -/// \brief A little helper class used to produce diagnostics. +/// A little helper class used to produce diagnostics. /// /// This is constructed by the DiagnosticsEngine::Report method, and /// allows insertion of extra information (arguments and source ranges) into @@ -1046,14 +1046,14 @@ class DiagnosticBuilder { mutable DiagnosticsEngine *DiagObj = nullptr; mutable unsigned NumArgs = 0; - /// \brief Status variable indicating if this diagnostic is still active. + /// Status variable indicating if this diagnostic is still active. /// // NOTE: This field is redundant with DiagObj (IsActive iff (DiagObj == 0)), // but LLVM is not currently smart enough to eliminate the null check that // Emit() would end up with if we used that as our status variable. mutable bool IsActive = false; - /// \brief Flag indicating that this diagnostic is being emitted via a + /// Flag indicating that this diagnostic is being emitted via a /// call to ForceEmit. mutable bool IsForceEmit = false; @@ -1071,17 +1071,17 @@ protected: DiagObj->NumDiagArgs = NumArgs; } - /// \brief Clear out the current diagnostic. + /// Clear out the current diagnostic. void Clear() const { DiagObj = nullptr; IsActive = false; IsForceEmit = false; } - /// \brief Determine whether this diagnostic is still active. + /// Determine whether this diagnostic is still active. bool isActive() const { return IsActive; } - /// \brief Force the diagnostic builder to emit the diagnostic now. + /// Force the diagnostic builder to emit the diagnostic now. /// /// Once this function has been called, the DiagnosticBuilder object /// should not be used again before it is destroyed. @@ -1119,23 +1119,23 @@ public: DiagnosticBuilder &operator=(const DiagnosticBuilder &) = delete; - /// \brief Emits the diagnostic. + /// Emits the diagnostic. ~DiagnosticBuilder() { Emit(); } - /// \brief Retrieve an empty diagnostic builder. + /// Retrieve an empty diagnostic builder. static DiagnosticBuilder getEmpty() { return {}; } - /// \brief Forces the diagnostic to be emitted. + /// Forces the diagnostic to be emitted. const DiagnosticBuilder &setForceEmit() const { IsForceEmit = true; return *this; } - /// \brief Conversion of DiagnosticBuilder to bool always returns \c true. + /// Conversion of DiagnosticBuilder to bool always returns \c true. /// /// This allows is to be used in boolean error contexts (where \c true is /// used to indicate that an error has occurred), like: @@ -1180,7 +1180,7 @@ struct AddFlagValue { explicit AddFlagValue(StringRef V) : Val(V) {} }; -/// \brief Register a value for the flag in the current diagnostic. This +/// Register a value for the flag in the current diagnostic. This /// value will be shown as the suffix "=value" after the flag name. It is /// useful in cases where the diagnostic flag accepts values (e.g., /// -Rpass or -Wframe-larger-than). @@ -1329,7 +1329,7 @@ public: unsigned getNumArgs() const { return DiagObj->NumDiagArgs; } - /// \brief Return the kind of the specified index. + /// Return the kind of the specified index. /// /// Based on the kind of argument, the accessors below can be used to get /// the value. @@ -1340,7 +1340,7 @@ public: return (DiagnosticsEngine::ArgumentKind)DiagObj->DiagArgumentsKind[Idx]; } - /// \brief Return the provided argument string specified by \p Idx. + /// Return the provided argument string specified by \p Idx. /// \pre getArgKind(Idx) == DiagnosticsEngine::ak_std_string const std::string &getArgStdStr(unsigned Idx) const { assert(getArgKind(Idx) == DiagnosticsEngine::ak_std_string && @@ -1348,7 +1348,7 @@ public: return DiagObj->DiagArgumentsStr[Idx]; } - /// \brief Return the specified C string argument. + /// Return the specified C string argument. /// \pre getArgKind(Idx) == DiagnosticsEngine::ak_c_string const char *getArgCStr(unsigned Idx) const { assert(getArgKind(Idx) == DiagnosticsEngine::ak_c_string && @@ -1356,7 +1356,7 @@ public: return reinterpret_cast(DiagObj->DiagArgumentsVal[Idx]); } - /// \brief Return the specified signed integer argument. + /// Return the specified signed integer argument. /// \pre getArgKind(Idx) == DiagnosticsEngine::ak_sint int getArgSInt(unsigned Idx) const { assert(getArgKind(Idx) == DiagnosticsEngine::ak_sint && @@ -1364,7 +1364,7 @@ public: return (int)DiagObj->DiagArgumentsVal[Idx]; } - /// \brief Return the specified unsigned integer argument. + /// Return the specified unsigned integer argument. /// \pre getArgKind(Idx) == DiagnosticsEngine::ak_uint unsigned getArgUInt(unsigned Idx) const { assert(getArgKind(Idx) == DiagnosticsEngine::ak_uint && @@ -1372,7 +1372,7 @@ public: return (unsigned)DiagObj->DiagArgumentsVal[Idx]; } - /// \brief Return the specified IdentifierInfo argument. + /// Return the specified IdentifierInfo argument. /// \pre getArgKind(Idx) == DiagnosticsEngine::ak_identifierinfo const IdentifierInfo *getArgIdentifier(unsigned Idx) const { assert(getArgKind(Idx) == DiagnosticsEngine::ak_identifierinfo && @@ -1380,7 +1380,7 @@ public: return reinterpret_cast(DiagObj->DiagArgumentsVal[Idx]); } - /// \brief Return the specified non-string argument in an opaque form. + /// Return the specified non-string argument in an opaque form. /// \pre getArgKind(Idx) != DiagnosticsEngine::ak_std_string intptr_t getRawArg(unsigned Idx) const { assert(getArgKind(Idx) != DiagnosticsEngine::ak_std_string && @@ -1388,7 +1388,7 @@ public: return DiagObj->DiagArgumentsVal[Idx]; } - /// \brief Return the number of source ranges associated with this diagnostic. + /// Return the number of source ranges associated with this diagnostic. unsigned getNumRanges() const { return DiagObj->DiagRanges.size(); } @@ -1399,7 +1399,7 @@ public: return DiagObj->DiagRanges[Idx]; } - /// \brief Return an array reference for this diagnostic's ranges. + /// Return an array reference for this diagnostic's ranges. ArrayRef getRanges() const { return DiagObj->DiagRanges; } @@ -1417,20 +1417,20 @@ public: return DiagObj->DiagFixItHints; } - /// \brief Format this diagnostic into a string, substituting the + /// Format this diagnostic into a string, substituting the /// formal arguments into the %0 slots. /// /// The result is appended onto the \p OutStr array. void FormatDiagnostic(SmallVectorImpl &OutStr) const; - /// \brief Format the given format-string into the output buffer using the + /// Format the given format-string into the output buffer using the /// arguments stored in this diagnostic. void FormatDiagnostic(const char *DiagStr, const char *DiagEnd, SmallVectorImpl &OutStr) const; }; /** - * \brief Represents a diagnostic in a form that can be retained until its + * Represents a diagnostic in a form that can be retained until its * corresponding source manager is destroyed. */ class StoredDiagnostic { @@ -1451,7 +1451,7 @@ public: ArrayRef Ranges, ArrayRef Fixits); - /// \brief Evaluates true when this object stores a diagnostic. + /// Evaluates true when this object stores a diagnostic. explicit operator bool() const { return !Message.empty(); } unsigned getID() const { return ID; } @@ -1482,7 +1482,7 @@ public: } }; -/// \brief Abstract interface, implemented by clients of the front-end, which +/// Abstract interface, implemented by clients of the front-end, which /// formats and prints fully processed diagnostics. class DiagnosticConsumer { protected: @@ -1497,7 +1497,7 @@ public: unsigned getNumWarnings() const { return NumWarnings; } virtual void clear() { NumWarnings = NumErrors = 0; } - /// \brief Callback to inform the diagnostic client that processing + /// Callback to inform the diagnostic client that processing /// of a source file is beginning. /// /// Note that diagnostics may be emitted outside the processing of a source @@ -1511,25 +1511,25 @@ public: virtual void BeginSourceFile(const LangOptions &LangOpts, const Preprocessor *PP = nullptr) {} - /// \brief Callback to inform the diagnostic client that processing + /// Callback to inform the diagnostic client that processing /// of a source file has ended. /// /// The diagnostic client should assume that any objects made available via /// BeginSourceFile() are inaccessible. virtual void EndSourceFile() {} - /// \brief Callback to inform the diagnostic client that processing of all + /// Callback to inform the diagnostic client that processing of all /// source files has ended. virtual void finish() {} - /// \brief Indicates whether the diagnostics handled by this + /// Indicates whether the diagnostics handled by this /// DiagnosticConsumer should be included in the number of diagnostics /// reported by DiagnosticsEngine. /// /// The default implementation returns true. virtual bool IncludeInDiagnosticCounts() const; - /// \brief Handle this diagnostic, reporting it to the user or + /// Handle this diagnostic, reporting it to the user or /// capturing it to a log as needed. /// /// The default implementation just keeps track of the total number of @@ -1538,7 +1538,7 @@ public: const Diagnostic &Info); }; -/// \brief A diagnostic client that ignores all diagnostics. +/// A diagnostic client that ignores all diagnostics. class IgnoringDiagConsumer : public DiagnosticConsumer { virtual void anchor(); @@ -1548,7 +1548,7 @@ class IgnoringDiagConsumer : public DiagnosticConsumer { } }; -/// \brief Diagnostic consumer that forwards diagnostics along to an +/// Diagnostic consumer that forwards diagnostics along to an /// existing, already-initialized diagnostic consumer. /// class ForwardingDiagnosticConsumer : public DiagnosticConsumer { -- cgit v1.2.1