Skip to content

Commit e207762

Browse files
committed
LLVM and SPIRV-LLVM-Translator pulldown (WW40)
2 parents ac706af + b12c4e3 commit e207762

File tree

421 files changed

+8707
-4509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

421 files changed

+8707
-4509
lines changed

clang-tools-extra/clangd/InlayHints.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,12 @@ std::vector<InlayHint> inlayHints(ParsedAST &AST) {
366366
std::vector<InlayHint> Results;
367367
InlayHintVisitor Visitor(Results, AST);
368368
Visitor.TraverseAST(AST.getASTContext());
369+
370+
// De-duplicate hints. Duplicates can sometimes occur due to e.g. explicit
371+
// template instantiations.
372+
llvm::sort(Results);
373+
Results.erase(std::unique(Results.begin(), Results.end()), Results.end());
374+
369375
return Results;
370376
}
371377

clang-tools-extra/clangd/Protocol.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,6 +1326,14 @@ llvm::json::Value toJSON(const InlayHint &H) {
13261326
return llvm::json::Object{
13271327
{"range", H.range}, {"kind", H.kind}, {"label", H.label}};
13281328
}
1329+
bool operator==(const InlayHint &A, const InlayHint &B) {
1330+
return std::tie(A.kind, A.range, A.label) ==
1331+
std::tie(B.kind, B.range, B.label);
1332+
}
1333+
bool operator<(const InlayHint &A, const InlayHint &B) {
1334+
return std::tie(A.kind, A.range, A.label) <
1335+
std::tie(B.kind, B.range, B.label);
1336+
}
13291337

13301338
static const char *toString(OffsetEncoding OE) {
13311339
switch (OE) {

clang-tools-extra/clangd/Protocol.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,6 +1548,8 @@ struct InlayHint {
15481548
std::string label;
15491549
};
15501550
llvm::json::Value toJSON(const InlayHint &);
1551+
bool operator==(const InlayHint &, const InlayHint &);
1552+
bool operator<(const InlayHint &, const InlayHint &);
15511553

15521554
struct ReferenceContext {
15531555
/// Include the declaration of the current symbol.

clang-tools-extra/clangd/unittests/InlayHintTests.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,18 @@ TEST(TypeHints, DefaultTemplateArgs) {
612612
ExpectedHint{": A<float>", "var"});
613613
}
614614

615+
TEST(TypeHints, Deduplication) {
616+
assertTypeHints(R"cpp(
617+
template <typename T>
618+
void foo() {
619+
auto $var[[var]] = 42;
620+
}
621+
template void foo<int>();
622+
template void foo<float>();
623+
)cpp",
624+
ExpectedHint{": int", "var"});
625+
}
626+
615627
// FIXME: Low-hanging fruit where we could omit a type hint:
616628
// - auto x = TypeName(...);
617629
// - auto x = (TypeName) (...);
@@ -625,4 +637,4 @@ TEST(TypeHints, DefaultTemplateArgs) {
625637

626638
} // namespace
627639
} // namespace clangd
628-
} // namespace clang
640+
} // namespace clang

clang/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
709709
CMAKE_CXX_COMPILER_LAUNCHER
710710
CMAKE_MAKE_PROGRAM
711711
CMAKE_OSX_ARCHITECTURES
712+
CMAKE_BUILD_TYPE
712713
LLVM_ENABLE_PROJECTS
713714
LLVM_ENABLE_RUNTIMES)
714715

clang/cmake/modules/AddClang.cmake

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,7 @@ macro(add_clang_library name)
100100
# The Xcode generator doesn't handle object libraries correctly.
101101
list(APPEND LIBTYPE OBJECT)
102102
endif()
103-
if (NOT EXCLUDE_FROM_ALL)
104-
# Only include libraries that don't have EXCLUDE_FROM_ALL set. This
105-
# ensure that the clang static analyzer libraries are not compiled
106-
# as part of clang-shlib if CLANG_ENABLE_STATIC_ANALYZER=OFF.
107-
set_property(GLOBAL APPEND PROPERTY CLANG_STATIC_LIBS ${name})
108-
endif()
103+
set_property(GLOBAL APPEND PROPERTY CLANG_STATIC_LIBS ${name})
109104
endif()
110105
llvm_add_library(${name} ${LIBTYPE} ${ARG_UNPARSED_ARGUMENTS} ${srcs})
111106

@@ -115,11 +110,8 @@ macro(add_clang_library name)
115110
endif()
116111

117112
foreach(lib ${libs})
118-
if(TARGET ${lib})
113+
if(TARGET ${lib})
119114
target_link_libraries(${lib} INTERFACE ${LLVM_COMMON_LIBS})
120-
if (EXCLUDE_FROM_ALL)
121-
continue()
122-
endif()
123115

124116
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN)
125117
get_target_export_arg(${name} Clang export_to_clangtargets UMBRELLA clang-libraries)

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8610,6 +8610,9 @@ def err_typecheck_choose_expr_requires_constant : Error<
86108610
"'__builtin_choose_expr' requires a constant expression">;
86118611
def warn_unused_expr : Warning<"expression result unused">,
86128612
InGroup<UnusedValue>;
8613+
def warn_unused_comma_left_operand : Warning<
8614+
"left operand of comma operator has no effect">,
8615+
InGroup<UnusedValue>;
86138616
def warn_unused_voidptr : Warning<
86148617
"expression result unused; should this cast be to 'void'?">,
86158618
InGroup<UnusedValue>;

clang/include/clang/Sema/Sema.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5169,7 +5169,7 @@ class Sema final {
51695169

51705170
/// DiagnoseUnusedExprResult - If the statement passed in is an expression
51715171
/// whose result is unused, warn.
5172-
void DiagnoseUnusedExprResult(const Stmt *S);
5172+
void DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID);
51735173
void DiagnoseUnusedNestedTypedefs(const RecordDecl *D);
51745174
void DiagnoseUnusedDecl(const NamedDecl *ND);
51755175

@@ -5375,6 +5375,16 @@ class Sema final {
53755375
/// conversion.
53765376
ExprResult tryConvertExprToType(Expr *E, QualType Ty);
53775377

5378+
/// Conditionally issue a diagnostic based on the statement's reachability
5379+
/// analysis evaluation context.
5380+
///
5381+
/// \param Statement If Statement is non-null, delay reporting the
5382+
/// diagnostic until the function body is parsed, and then do a basic
5383+
/// reachability analysis to determine if the statement is reachable.
5384+
/// If it is unreachable, the diagnostic will not be emitted.
5385+
bool DiagIfReachable(SourceLocation Loc, ArrayRef<const Stmt *> Stmts,
5386+
const PartialDiagnostic &PD);
5387+
53785388
/// Conditionally issue a diagnostic based on the current
53795389
/// evaluation context.
53805390
///

clang/lib/AST/ASTContext.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7097,7 +7097,7 @@ ASTContext::getObjCEncodingForFunctionDecl(const FunctionDecl *Decl) const {
70977097
void ASTContext::getObjCEncodingForMethodParameter(Decl::ObjCDeclQualifier QT,
70987098
QualType T, std::string& S,
70997099
bool Extended) const {
7100-
// Encode type qualifer, 'in', 'inout', etc. for the parameter.
7100+
// Encode type qualifier, 'in', 'inout', etc. for the parameter.
71017101
getObjCEncodingForTypeQualifier(QT, S);
71027102
// Encode parameter type.
71037103
ObjCEncOptions Options = ObjCEncOptions()
@@ -7807,7 +7807,7 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string &S,
78077807
.setExpandStructures()),
78087808
FD);
78097809
if (FD || Options.EncodingProperty() || Options.EncodeClassNames()) {
7810-
// Note that we do extended encoding of protocol qualifer list
7810+
// Note that we do extended encoding of protocol qualifier list
78117811
// Only when doing ivar or property encoding.
78127812
S += '"';
78137813
for (const auto *I : OPT->quals()) {
@@ -10086,7 +10086,7 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS,
1008610086
unsigned LHSBits = LHS->castAs<ExtIntType>()->getNumBits();
1008710087
unsigned RHSBits = RHS->castAs<ExtIntType>()->getNumBits();
1008810088

10089-
// Like unsigned/int, shouldn't have a type if they dont match.
10089+
// Like unsigned/int, shouldn't have a type if they don't match.
1009010090
if (LHSUnsigned != RHSUnsigned)
1009110091
return {};
1009210092

@@ -10727,7 +10727,7 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context,
1072710727
}
1072810728

1072910729
// On some targets such as PowerPC, some of the builtins are defined with custom
10730-
// type decriptors for target-dependent types. These descriptors are decoded in
10730+
// type descriptors for target-dependent types. These descriptors are decoded in
1073110731
// other functions, but it may be useful to be able to fall back to default
1073210732
// descriptor decoding to define builtins mixing target-dependent and target-
1073310733
// independent types. This function allows decoding one type descriptor with

clang/lib/AST/ASTImporter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,7 @@ ASTNodeImporter::ImportDeclContext(DeclContext *FromDC, bool ForceImport) {
18301830
RecordDecl *FromRecordDecl = nullptr;
18311831
RecordDecl *ToRecordDecl = nullptr;
18321832
// If we have a field that is an ArrayType we need to check if the array
1833-
// element is a RecordDecl and if so we need to import the defintion.
1833+
// element is a RecordDecl and if so we need to import the definition.
18341834
if (FieldFrom->getType()->isArrayType()) {
18351835
// getBaseElementTypeUnsafe(...) handles multi-dimensonal arrays for us.
18361836
FromRecordDecl = FieldFrom->getType()->getBaseElementTypeUnsafe()->getAsRecordDecl();

clang/lib/AST/CommentBriefParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ std::string BriefParser::Parse() {
123123
// We found a paragraph end. This ends the brief description if
124124
// \command or its equivalent was explicitly used.
125125
// Stop scanning text because an explicit \paragraph is the
126-
// preffered one.
126+
// preferred one.
127127
if (InBrief)
128128
break;
129129
// End first paragraph if we found some non-whitespace text.

clang/lib/AST/ComparisonCategories.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ bool ComparisonCategoryInfo::ValueInfo::hasValidIntValue() const {
5757

5858
/// Attempt to determine the integer value used to represent the comparison
5959
/// category result by evaluating the initializer for the specified VarDecl as
60-
/// a constant expression and retreiving the value of the class's first
60+
/// a constant expression and retrieving the value of the class's first
6161
/// (and only) field.
6262
///
6363
/// Note: The STL types are expected to have the form:

clang/lib/AST/DeclCXX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2337,7 +2337,7 @@ bool CXXMethodDecl::isUsualDeallocationFunction(
23372337
// In C++17 onwards, all potential usual deallocation functions are actual
23382338
// usual deallocation functions. Honor this behavior when post-C++14
23392339
// deallocation functions are offered as extensions too.
2340-
// FIXME(EricWF): Destrying Delete should be a language option. How do we
2340+
// FIXME(EricWF): Destroying Delete should be a language option. How do we
23412341
// handle when destroying delete is used prior to C++17?
23422342
if (Context.getLangOpts().CPlusPlus17 ||
23432343
Context.getLangOpts().AlignedAllocation ||

clang/lib/AST/DeclTemplate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ TemplateParameterList::TemplateParameterList(const ASTContext& C,
7777
if (TTP->hasTypeConstraint())
7878
HasConstrainedParameters = true;
7979
} else {
80-
llvm_unreachable("unexpcted template parameter type");
80+
llvm_unreachable("unexpected template parameter type");
8181
}
8282
// FIXME: If a default argument contains an unexpanded parameter pack, the
8383
// template parameter list does too.

clang/lib/AST/ExprConstant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6759,7 +6759,7 @@ class BitCastBuffer {
67596759
SmallVectorImpl<unsigned char> &Output) const {
67606760
for (CharUnits I = Offset, E = Offset + Width; I != E; ++I) {
67616761
// If a byte of an integer is uninitialized, then the whole integer is
6762-
// uninitalized.
6762+
// uninitialized.
67636763
if (!Bytes[I.getQuantity()])
67646764
return false;
67656765
Output.push_back(*Bytes[I.getQuantity()]);

clang/lib/AST/Interp/Descriptor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ struct InlineDescriptor {
184184

185185
/// Bitfield tracking the initialisation status of elements of primitive arrays.
186186
/// A pointer to this is embedded at the end of all primitive arrays.
187-
/// If the map was not yet created and nothing was initialied, the pointer to
187+
/// If the map was not yet created and nothing was initialized, the pointer to
188188
/// this structure is 0. If the object was fully initialized, the pointer is -1.
189189
struct InitMap {
190190
private:

clang/lib/AST/Interp/Function.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Function {
7373
/// Returns the original FunctionDecl.
7474
const FunctionDecl *getDecl() const { return F; }
7575

76-
/// Returns the lcoation.
76+
/// Returns the location.
7777
SourceLocation getLoc() const { return Loc; }
7878

7979
/// Returns a parameter descriptor.

clang/lib/AST/Interp/InterpStack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class InterpStack final {
6969
return ((sizeof(T) + PtrAlign - 1) / PtrAlign) * PtrAlign;
7070
}
7171

72-
/// Grows the stack to accomodate a value and returns a pointer to it.
72+
/// Grows the stack to accommodate a value and returns a pointer to it.
7373
void *grow(size_t Size);
7474
/// Returns a pointer from the top of the stack.
7575
void *peek(size_t Size);

clang/lib/AST/Interp/InterpState.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class InterpState final : public State, public SourceMapper {
4646
return Parent.getBottomFrame();
4747
}
4848

49-
// Acces objects from the walker context.
49+
// Access objects from the walker context.
5050
Expr::EvalStatus &getEvalStatus() const override {
5151
return Parent.getEvalStatus();
5252
}

clang/lib/AST/Interp/Opcodes.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def ArgValueDecl : ArgType { let Name = "const ValueDecl *"; }
5757
def ArgRecordField : ArgType { let Name = "const Record::Field *"; }
5858

5959
//===----------------------------------------------------------------------===//
60-
// Classes of types intructions operate on.
60+
// Classes of types instructions operate on.
6161
//===----------------------------------------------------------------------===//
6262

6363
class TypeClass {

clang/lib/AST/Interp/Program.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ llvm::Optional<unsigned> Program::getGlobal(const ValueDecl *VD) {
104104
if (It != GlobalIndices.end())
105105
return It->second;
106106

107-
// Find any previous declarations which were aleady evaluated.
107+
// Find any previous declarations which were already evaluated.
108108
llvm::Optional<unsigned> Index;
109109
for (const Decl *P = VD; P; P = P->getPreviousDecl()) {
110110
auto It = GlobalIndices.find(P);

clang/lib/AST/MicrosoftMangle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3625,7 +3625,7 @@ void MicrosoftMangleContextImpl::mangleCXXCatchableType(
36253625
// FIXME: It is known that the Ctor is present in 2013, and in 2017.7
36263626
// (_MSC_VER 1914) and newer, and that it's omitted in 2015 and 2017.4
36273627
// (_MSC_VER 1911), but it's unknown when exactly it reappeared (1914?
3628-
// Or 1912, 1913 aleady?).
3628+
// Or 1912, 1913 already?).
36293629
bool OmitCopyCtor = getASTContext().getLangOpts().isCompatibleWithMSVC(
36303630
LangOptions::MSVC2015) &&
36313631
!getASTContext().getLangOpts().isCompatibleWithMSVC(

clang/lib/AST/RecordLayoutBuilder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,7 +1954,7 @@ void ItaniumRecordLayoutBuilder::LayoutField(const FieldDecl *D,
19541954

19551955
// Since the combination of -mms-bitfields together with structs
19561956
// like max_align_t (which contains a long double) for mingw is
1957-
// quite comon (and GCC handles it silently), just handle it
1957+
// quite common (and GCC handles it silently), just handle it
19581958
// silently there. For other targets that have ms_struct enabled
19591959
// (most probably via a pragma or attribute), trigger a diagnostic
19601960
// that defaults to an error.
@@ -2632,7 +2632,7 @@ MicrosoftRecordLayoutBuilder::getAdjustedElementInfo(
26322632
// Track zero-sized subobjects here where it's already available.
26332633
EndsWithZeroSizedObject = Layout.endsWithZeroSizedObject();
26342634
// Respect required alignment, this is necessary because we may have adjusted
2635-
// the alignment in the case of pragam pack. Note that the required alignment
2635+
// the alignment in the case of pragma pack. Note that the required alignment
26362636
// doesn't actually apply to the struct alignment at this point.
26372637
Alignment = std::max(Alignment, Info.Alignment);
26382638
RequiredAlignment = std::max(RequiredAlignment, Layout.getRequiredAlignment());

clang/lib/Format/ContinuationIndenter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ void ContinuationIndenter::moveStatePastScopeCloser(LineState &State) {
16071607
// BreakBeforeParameter is calculated based on an incorrect assumption
16081608
// (it is checked whether the whole expression fits into one line without
16091609
// considering a line break inside a message receiver).
1610-
// We check whether arguements fit after receiver scope closer (into the same
1610+
// We check whether arguments fit after receiver scope closer (into the same
16111611
// line).
16121612
if (State.Stack.back().BreakBeforeParameter && Current.MatchingParen &&
16131613
Current.MatchingParen->Previous) {

clang/lib/Format/Format.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ template <> struct ScalarEnumerationTraits<FormatStyle::AlignConsecutiveStyle> {
147147
IO.enumCase(Value, "AcrossEmptyLinesAndComments",
148148
FormatStyle::ACS_AcrossEmptyLinesAndComments);
149149

150-
// For backward compability.
150+
// For backward compatibility.
151151
IO.enumCase(Value, "true", FormatStyle::ACS_Consecutive);
152152
IO.enumCase(Value, "false", FormatStyle::ACS_None);
153153
}

clang/lib/Format/MacroExpander.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class MacroExpander::DefinitionParser {
5252
Current = Tokens[0];
5353
}
5454

55-
// Parse the token stream and return the corresonding Definition object.
55+
// Parse the token stream and return the corresponding Definition object.
5656
// Returns an empty definition object with a null-Name on error.
5757
MacroExpander::Definition parse() {
5858
if (!Current->is(tok::identifier))

clang/lib/Format/TokenAnnotator.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,7 +1671,7 @@ class AnnotatingParser {
16711671
Current.setType(TT_TrailingReturnArrow);
16721672
} else if (Current.is(tok::arrow) && Current.Previous &&
16731673
Current.Previous->is(tok::r_brace)) {
1674-
// Concept implicit conversion contraint needs to be treated like
1674+
// Concept implicit conversion constraint needs to be treated like
16751675
// a trailing return type ... } -> <type>.
16761676
Current.setType(TT_TrailingReturnArrow);
16771677
} else if (isDeductionGuide(Current)) {
@@ -2998,7 +2998,7 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line,
29982998
if (!TokenBeforeMatchingParen || !Left.is(TT_TypeDeclarationParen))
29992999
return true;
30003000
}
3001-
// Add a space if the previous token is a pointer qualifer or the closing
3001+
// Add a space if the previous token is a pointer qualifier or the closing
30023002
// parenthesis of __attribute__(()) expression and the style requires spaces
30033003
// after pointer qualifiers.
30043004
if ((Style.SpaceAroundPointerQualifiers == FormatStyle::SAPQ_After ||
@@ -3019,7 +3019,7 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line,
30193019
!Line.IsMultiVariableDeclStmt)))
30203020
return true;
30213021
if (Left.is(TT_PointerOrReference)) {
3022-
// Add a space if the next token is a pointer qualifer and the style
3022+
// Add a space if the next token is a pointer qualifier and the style
30233023
// requires spaces before pointer qualifiers.
30243024
if ((Style.SpaceAroundPointerQualifiers == FormatStyle::SAPQ_Before ||
30253025
Style.SpaceAroundPointerQualifiers == FormatStyle::SAPQ_Both) &&
@@ -3038,7 +3038,7 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line,
30383038
!Left.Previous->isOneOf(tok::l_paren, tok::coloncolon,
30393039
tok::l_square));
30403040
}
3041-
// Ensure right pointer alignement with ellipsis e.g. int *...P
3041+
// Ensure right pointer alignment with ellipsis e.g. int *...P
30423042
if (Left.is(tok::ellipsis) && Left.Previous &&
30433043
Left.Previous->isOneOf(tok::star, tok::amp, tok::ampamp))
30443044
return Style.PointerAlignment != FormatStyle::PAS_Right;
@@ -3713,7 +3713,7 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line,
37133713
if (Left.is(TT_ArrayInitializerLSquare) && Left.is(tok::l_square) &&
37143714
!Right.is(tok::r_square))
37153715
return true;
3716-
// Always break afer successive entries.
3716+
// Always break after successive entries.
37173717
// 1,
37183718
// 2
37193719
if (Left.is(tok::comma))

clang/lib/Format/UnwrappedLineFormatter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class LevelIndentTracker {
104104
RootToken.isObjCAccessSpecifier() ||
105105
(RootToken.isOneOf(Keywords.kw_signals, Keywords.kw_qsignals) &&
106106
RootToken.Next && RootToken.Next->is(tok::colon))) {
107-
// The AccessModifierOffset may be overriden by IndentAccessModifiers,
107+
// The AccessModifierOffset may be overridden by IndentAccessModifiers,
108108
// in which case we take a negative value of the IndentWidth to simulate
109109
// the upper indent level.
110110
return Style.IndentAccessModifiers ? -Style.IndentWidth

clang/lib/Format/WhitespaceManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ class WhitespaceManager {
257257
/// Does this \p Cell contain a split element?
258258
static bool isSplitCell(const CellDescription &Cell);
259259

260-
/// Get the width of the preceeding cells from \p Start to \p End.
260+
/// Get the width of the preceding cells from \p Start to \p End.
261261
template <typename I>
262262
auto getNetWidth(const I &Start, const I &End, unsigned InitialSpaces) const {
263263
auto NetWidth = InitialSpaces;

0 commit comments

Comments
 (0)