diff options
author | Adrian Prantl <aprantl@apple.com> | 2018-05-09 01:00:01 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2018-05-09 01:00:01 +0000 |
commit | 647be32c6048e24f90f470c557e850597e5526c3 (patch) | |
tree | 2be5c01566ec82e55fd30ceedef970efd887b4a5 /lib/Format/UnwrappedLineFormatter.cpp | |
parent | c8ad1ab42f269f29bcf6385446e5b728aff7e4ad (diff) |
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
Diffstat (limited to 'lib/Format/UnwrappedLineFormatter.cpp')
-rw-r--r-- | lib/Format/UnwrappedLineFormatter.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/Format/UnwrappedLineFormatter.cpp b/lib/Format/UnwrappedLineFormatter.cpp index 45ddc1cc63..337a662275 100644 --- a/lib/Format/UnwrappedLineFormatter.cpp +++ b/lib/Format/UnwrappedLineFormatter.cpp @@ -27,7 +27,7 @@ bool startsExternCBlock(const AnnotatedLine &Line) { NextNext && NextNext->is(tok::l_brace); } -/// \brief Tracks the indent level of \c AnnotatedLines across levels. +/// Tracks the indent level of \c AnnotatedLines across levels. /// /// \c nextLine must be called for each \c AnnotatedLine, after which \c /// getIndent() will return the indent for the last line \c nextLine was called @@ -46,10 +46,10 @@ public: IndentForLevel.push_back(Style.IndentWidth * i + AdditionalIndent); } - /// \brief Returns the indent for the current line. + /// Returns the indent for the current line. unsigned getIndent() const { return Indent; } - /// \brief Update the indent state given that \p Line is going to be formatted + /// Update the indent state given that \p Line is going to be formatted /// next. void nextLine(const AnnotatedLine &Line) { Offset = getIndentOffset(*Line.First); @@ -67,14 +67,14 @@ public: Indent += Offset; } - /// \brief Update the indent state given that \p Line indent should be + /// Update the indent state given that \p Line indent should be /// skipped. void skipLine(const AnnotatedLine &Line) { while (IndentForLevel.size() <= Line.Level) IndentForLevel.push_back(Indent); } - /// \brief Update the level indent to adapt to the given \p Line. + /// Update the level indent to adapt to the given \p Line. /// /// When a line is not formatted, we move the subsequent lines on the same /// level to the same indent. @@ -89,7 +89,7 @@ public: } private: - /// \brief Get the offset of the line relatively to the level. + /// Get the offset of the line relatively to the level. /// /// For example, 'public:' labels in classes are offset by 1 or 2 /// characters to the left from their level. @@ -105,7 +105,7 @@ private: return 0; } - /// \brief Get the indent of \p Level from \p IndentForLevel. + /// Get the indent of \p Level from \p IndentForLevel. /// /// \p IndentForLevel must contain the indent for the level \c l /// at \p IndentForLevel[l], or a value < 0 if the indent for @@ -122,16 +122,16 @@ private: const AdditionalKeywords &Keywords; const unsigned AdditionalIndent; - /// \brief The indent in characters for each level. + /// The indent in characters for each level. std::vector<int> IndentForLevel; - /// \brief Offset of the current line relative to the indent level. + /// Offset of the current line relative to the indent level. /// /// For example, the 'public' keywords is often indented with a negative /// offset. int Offset = 0; - /// \brief The current line's indent. + /// The current line's indent. unsigned Indent = 0; }; @@ -158,7 +158,7 @@ public: : Style(Style), Keywords(Keywords), End(Lines.end()), Next(Lines.begin()), AnnotatedLines(Lines) {} - /// \brief Returns the next line, merging multiple lines into one if possible. + /// Returns the next line, merging multiple lines into one if possible. const AnnotatedLine *getNextMergedLine(bool DryRun, LevelIndentTracker &IndentTracker) { if (Next == End) @@ -180,7 +180,7 @@ public: } private: - /// \brief Calculates how many lines can be merged into 1 starting at \p I. + /// Calculates how many lines can be merged into 1 starting at \p I. unsigned tryFitMultipleLinesInOne(LevelIndentTracker &IndentTracker, SmallVectorImpl<AnnotatedLine *>::const_iterator I, @@ -666,7 +666,7 @@ static void printLineState(const LineState &State) { } #endif -/// \brief Base class for classes that format one \c AnnotatedLine. +/// Base class for classes that format one \c AnnotatedLine. class LineFormatter { public: LineFormatter(ContinuationIndenter *Indenter, WhitespaceManager *Whitespaces, @@ -676,7 +676,7 @@ public: BlockFormatter(BlockFormatter) {} virtual ~LineFormatter() {} - /// \brief Formats an \c AnnotatedLine and returns the penalty. + /// Formats an \c AnnotatedLine and returns the penalty. /// /// If \p DryRun is \c false, directly applies the changes. virtual unsigned formatLine(const AnnotatedLine &Line, @@ -685,7 +685,7 @@ public: bool DryRun) = 0; protected: - /// \brief If the \p State's next token is an r_brace closing a nested block, + /// If the \p State's next token is an r_brace closing a nested block, /// format the nested block before it. /// /// Returns \c true if all children could be placed successfully and adapts @@ -767,7 +767,7 @@ private: UnwrappedLineFormatter *BlockFormatter; }; -/// \brief Formatter that keeps the existing line breaks. +/// Formatter that keeps the existing line breaks. class NoColumnLimitLineFormatter : public LineFormatter { public: NoColumnLimitLineFormatter(ContinuationIndenter *Indenter, @@ -776,7 +776,7 @@ public: UnwrappedLineFormatter *BlockFormatter) : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {} - /// \brief Formats the line, simply keeping all of the input's line breaking + /// Formats the line, simply keeping all of the input's line breaking /// decisions. unsigned formatLine(const AnnotatedLine &Line, unsigned FirstIndent, unsigned FirstStartColumn, bool DryRun) override { @@ -795,7 +795,7 @@ public: } }; -/// \brief Formatter that puts all tokens into a single line without breaks. +/// Formatter that puts all tokens into a single line without breaks. class NoLineBreakFormatter : public LineFormatter { public: NoLineBreakFormatter(ContinuationIndenter *Indenter, @@ -803,7 +803,7 @@ public: UnwrappedLineFormatter *BlockFormatter) : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {} - /// \brief Puts all tokens into a single line. + /// Puts all tokens into a single line. unsigned formatLine(const AnnotatedLine &Line, unsigned FirstIndent, unsigned FirstStartColumn, bool DryRun) override { unsigned Penalty = 0; @@ -818,7 +818,7 @@ public: } }; -/// \brief Finds the best way to break lines. +/// Finds the best way to break lines. class OptimizingLineFormatter : public LineFormatter { public: OptimizingLineFormatter(ContinuationIndenter *Indenter, @@ -827,7 +827,7 @@ public: UnwrappedLineFormatter *BlockFormatter) : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {} - /// \brief Formats the line by finding the best line breaks with line lengths + /// Formats the line by finding the best line breaks with line lengths /// below the column limit. unsigned formatLine(const AnnotatedLine &Line, unsigned FirstIndent, unsigned FirstStartColumn, bool DryRun) override { @@ -850,14 +850,14 @@ private: } }; - /// \brief A pair of <penalty, count> that is used to prioritize the BFS on. + /// A pair of <penalty, count> that is used to prioritize the BFS on. /// /// In case of equal penalties, we want to prefer states that were inserted /// first. During state generation we make sure that we insert states first /// that break the line as late as possible. typedef std::pair<unsigned, unsigned> OrderedPenalty; - /// \brief An edge in the solution space from \c Previous->State to \c State, + /// An edge in the solution space from \c Previous->State to \c State, /// inserting a newline dependent on the \c NewLine. struct StateNode { StateNode(const LineState &State, bool NewLine, StateNode *Previous) @@ -867,16 +867,16 @@ private: StateNode *Previous; }; - /// \brief An item in the prioritized BFS search queue. The \c StateNode's + /// An item in the prioritized BFS search queue. The \c StateNode's /// \c State has the given \c OrderedPenalty. typedef std::pair<OrderedPenalty, StateNode *> QueueItem; - /// \brief The BFS queue type. + /// The BFS queue type. typedef std::priority_queue<QueueItem, std::vector<QueueItem>, std::greater<QueueItem>> QueueType; - /// \brief Analyze the entire solution space starting from \p InitialState. + /// Analyze the entire solution space starting from \p InitialState. /// /// This implements a variant of Dijkstra's algorithm on the graph that spans /// the solution space (\c LineStates are the nodes). The algorithm tries to @@ -943,7 +943,7 @@ private: return Penalty; } - /// \brief Add the following state to the analysis queue \c Queue. + /// Add the following state to the analysis queue \c Queue. /// /// Assume the current state is \p PreviousNode and has been reached with a /// penalty of \p Penalty. Insert a line break if \p NewLine is \c true. @@ -965,7 +965,7 @@ private: ++(*Count); } - /// \brief Applies the best formatting by reconstructing the path in the + /// Applies the best formatting by reconstructing the path in the /// solution space that leads to \c Best. void reconstructPath(LineState &State, StateNode *Best) { std::deque<StateNode *> Path; |