[clang] f119170 - [clang] Fix a few comment typos to cycle bots
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 20 15:48:44 PDT 2021
Author: Nico Weber
Date: 2021-09-20T18:48:34-04:00
New Revision: f11917057923bce7f9c04282b4a3b15ef0aad0d6
URL: https://github.com/llvm/llvm-project/commit/f11917057923bce7f9c04282b4a3b15ef0aad0d6
DIFF: https://github.com/llvm/llvm-project/commit/f11917057923bce7f9c04282b4a3b15ef0aad0d6.diff
LOG: [clang] Fix a few comment typos to cycle bots
Added:
Modified:
clang/lib/Format/ContinuationIndenter.cpp
clang/lib/Format/Format.cpp
clang/lib/Format/MacroExpander.cpp
clang/lib/Format/TokenAnnotator.cpp
clang/lib/Format/UnwrappedLineFormatter.cpp
clang/lib/Format/WhitespaceManager.h
Removed:
################################################################################
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index a6c5b63910c14..1e4f5690ef241 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -1607,7 +1607,7 @@ void ContinuationIndenter::moveStatePastScopeCloser(LineState &State) {
// BreakBeforeParameter is calculated based on an incorrect assumption
// (it is checked whether the whole expression fits into one line without
// considering a line break inside a message receiver).
- // We check whether arguements fit after receiver scope closer (into the same
+ // We check whether arguments fit after receiver scope closer (into the same
// line).
if (State.Stack.back().BreakBeforeParameter && Current.MatchingParen &&
Current.MatchingParen->Previous) {
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index ecc6d3f3a47e4..580f32b9ba48c 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -147,7 +147,7 @@ template <> struct ScalarEnumerationTraits<FormatStyle::AlignConsecutiveStyle> {
IO.enumCase(Value, "AcrossEmptyLinesAndComments",
FormatStyle::ACS_AcrossEmptyLinesAndComments);
- // For backward compability.
+ // For backward compatibility.
IO.enumCase(Value, "true", FormatStyle::ACS_Consecutive);
IO.enumCase(Value, "false", FormatStyle::ACS_None);
}
diff --git a/clang/lib/Format/MacroExpander.cpp b/clang/lib/Format/MacroExpander.cpp
index 07fa8e7a81e8f..de96cb24ba1ff 100644
--- a/clang/lib/Format/MacroExpander.cpp
+++ b/clang/lib/Format/MacroExpander.cpp
@@ -52,7 +52,7 @@ class MacroExpander::DefinitionParser {
Current = Tokens[0];
}
- // Parse the token stream and return the corresonding Definition object.
+ // Parse the token stream and return the corresponding Definition object.
// Returns an empty definition object with a null-Name on error.
MacroExpander::Definition parse() {
if (!Current->is(tok::identifier))
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index c8d4ee47ee7e3..bc84666ddfc74 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1671,7 +1671,7 @@ class AnnotatingParser {
Current.setType(TT_TrailingReturnArrow);
} else if (Current.is(tok::arrow) && Current.Previous &&
Current.Previous->is(tok::r_brace)) {
- // Concept implicit conversion contraint needs to be treated like
+ // Concept implicit conversion constraint needs to be treated like
// a trailing return type ... } -> <type>.
Current.setType(TT_TrailingReturnArrow);
} else if (isDeductionGuide(Current)) {
@@ -2998,7 +2998,7 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line,
if (!TokenBeforeMatchingParen || !Left.is(TT_TypeDeclarationParen))
return true;
}
- // Add a space if the previous token is a pointer qualifer or the closing
+ // Add a space if the previous token is a pointer qualifier or the closing
// parenthesis of __attribute__(()) expression and the style requires spaces
// after pointer qualifiers.
if ((Style.SpaceAroundPointerQualifiers == FormatStyle::SAPQ_After ||
@@ -3019,7 +3019,7 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line,
!Line.IsMultiVariableDeclStmt)))
return true;
if (Left.is(TT_PointerOrReference)) {
- // Add a space if the next token is a pointer qualifer and the style
+ // Add a space if the next token is a pointer qualifier and the style
// requires spaces before pointer qualifiers.
if ((Style.SpaceAroundPointerQualifiers == FormatStyle::SAPQ_Before ||
Style.SpaceAroundPointerQualifiers == FormatStyle::SAPQ_Both) &&
@@ -3038,7 +3038,7 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line,
!Left.Previous->isOneOf(tok::l_paren, tok::coloncolon,
tok::l_square));
}
- // Ensure right pointer alignement with ellipsis e.g. int *...P
+ // Ensure right pointer alignment with ellipsis e.g. int *...P
if (Left.is(tok::ellipsis) && Left.Previous &&
Left.Previous->isOneOf(tok::star, tok::amp, tok::ampamp))
return Style.PointerAlignment != FormatStyle::PAS_Right;
@@ -3713,7 +3713,7 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line,
if (Left.is(TT_ArrayInitializerLSquare) && Left.is(tok::l_square) &&
!Right.is(tok::r_square))
return true;
- // Always break afer successive entries.
+ // Always break after successive entries.
// 1,
// 2
if (Left.is(tok::comma))
diff --git a/clang/lib/Format/UnwrappedLineFormatter.cpp b/clang/lib/Format/UnwrappedLineFormatter.cpp
index 2577aea3a480d..299536cd806eb 100644
--- a/clang/lib/Format/UnwrappedLineFormatter.cpp
+++ b/clang/lib/Format/UnwrappedLineFormatter.cpp
@@ -104,7 +104,7 @@ class LevelIndentTracker {
RootToken.isObjCAccessSpecifier() ||
(RootToken.isOneOf(Keywords.kw_signals, Keywords.kw_qsignals) &&
RootToken.Next && RootToken.Next->is(tok::colon))) {
- // The AccessModifierOffset may be overriden by IndentAccessModifiers,
+ // The AccessModifierOffset may be overridden by IndentAccessModifiers,
// in which case we take a negative value of the IndentWidth to simulate
// the upper indent level.
return Style.IndentAccessModifiers ? -Style.IndentWidth
diff --git a/clang/lib/Format/WhitespaceManager.h b/clang/lib/Format/WhitespaceManager.h
index 4f8f95040af6a..029f4159b748a 100644
--- a/clang/lib/Format/WhitespaceManager.h
+++ b/clang/lib/Format/WhitespaceManager.h
@@ -257,7 +257,7 @@ class WhitespaceManager {
/// Does this \p Cell contain a split element?
static bool isSplitCell(const CellDescription &Cell);
- /// Get the width of the preceeding cells from \p Start to \p End.
+ /// Get the width of the preceding cells from \p Start to \p End.
template <typename I>
auto getNetWidth(const I &Start, const I &End, unsigned InitialSpaces) const {
auto NetWidth = InitialSpaces;
More information about the cfe-commits
mailing list