Skip to content

Commit 9b4f8ac

Browse files
committed
[clang] Fix a few comment typos to cycle bots
1 parent 540893e commit 9b4f8ac

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

clang/lib/Sema/SemaDecl.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ void Sema::ActOnExitFunctionContext() {
14931493
///
14941494
/// This routine determines whether overloading is possible, not
14951495
/// whether a new declaration actually overloads a previous one.
1496-
/// It will return true in C++ (where overloads are alway permitted)
1496+
/// It will return true in C++ (where overloads are always permitted)
14971497
/// or, as a C extension, when either the new declaration or a
14981498
/// previous one is declared with the 'overloadable' attribute.
14991499
static bool AllowOverloadingOfFunction(const LookupResult &Previous,
@@ -4147,7 +4147,7 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S,
41474147

41484148
// If we are merging two functions where only one of them has a prototype,
41494149
// we may have enough information to decide to issue a diagnostic that the
4150-
// function without a protoype will change behavior in C23. This handles
4150+
// function without a prototype will change behavior in C23. This handles
41514151
// cases like:
41524152
// void i(); void i(int j);
41534153
// void i(int j); void i();
@@ -10553,7 +10553,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
1055310553
if (getLangOpts().CUDA && !isFunctionTemplateSpecialization)
1055410554
CUDA().maybeAddHostDeviceAttrs(NewFD, Previous);
1055510555

10556-
// Handle explict specializations of function templates
10556+
// Handle explicit specializations of function templates
1055710557
// and friend function declarations with an explicit
1055810558
// template argument list.
1055910559
if (isFunctionTemplateSpecialization) {
@@ -12601,7 +12601,7 @@ void Sema::CheckMSVCRTEntryPoint(FunctionDecl *FD) {
1260112601
if (FD->getName() != "DllMain")
1260212602
FD->setHasImplicitReturnZero(true);
1260312603

12604-
// Explicity specified calling conventions are applied to MSVC entry points
12604+
// Explicitly specified calling conventions are applied to MSVC entry points
1260512605
if (!hasExplicitCallingConv(T)) {
1260612606
if (isDefaultStdCall(FD, *this)) {
1260712607
if (FT->getCallConv() != CC_X86StdCall) {
@@ -13674,12 +13674,12 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
1367413674
CreateRecoveryExpr(Init->getBeginLoc(), Init->getEndLoc(), Args);
1367513675
if (RecoveryExpr.get())
1367613676
VDecl->setInit(RecoveryExpr.get());
13677-
// In general, for error recovery purposes, the initalizer doesn't play
13677+
// In general, for error recovery purposes, the initializer doesn't play
1367813678
// part in the valid bit of the declaration. There are a few exceptions:
1367913679
// 1) if the var decl has a deduced auto type, and the type cannot be
1368013680
// deduced by an invalid initializer;
13681-
// 2) if the var decl is decompsition decl with a non-deduced type, and
13682-
// the initialization fails (e.g. `int [a] = {1, 2};`);
13681+
// 2) if the var decl is a decomposition decl with a non-deduced type,
13682+
// and the initialization fails (e.g. `int [a] = {1, 2};`);
1368313683
// Case 1) was already handled elsewhere.
1368413684
if (isa<DecompositionDecl>(VDecl)) // Case 2)
1368513685
VDecl->setInvalidDecl();
@@ -13897,9 +13897,9 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
1389713897
}
1389813898
} else if (VDecl->isFileVarDecl()) {
1389913899
// In C, extern is typically used to avoid tentative definitions when
13900-
// declaring variables in headers, but adding an intializer makes it a
13900+
// declaring variables in headers, but adding an initializer makes it a
1390113901
// definition. This is somewhat confusing, so GCC and Clang both warn on it.
13902-
// In C++, extern is often used to give implictly static const variables
13902+
// In C++, extern is often used to give implicitly static const variables
1390313903
// external linkage, so don't warn in that case. If selectany is present,
1390413904
// this might be header code intended for C and C++ inclusion, so apply the
1390513905
// C++ rules.
@@ -14093,7 +14093,7 @@ void Sema::ActOnUninitializedDecl(Decl *RealDecl) {
1409314093
return;
1409414094
}
1409514095
}
14096-
// The declaration is unitialized, no need for further checks.
14096+
// The declaration is uninitialized, no need for further checks.
1409714097
return;
1409814098
}
1409914099

@@ -16324,7 +16324,7 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body,
1632416324
FSI->ObjCWarnForNoDesignatedInitChain = false;
1632516325
}
1632616326
if (FSI->ObjCWarnForNoInitDelegation) {
16327-
// Don't issue this warning for unavaialable inits.
16327+
// Don't issue this warning for unavailable inits.
1632816328
if (!MD->isUnavailable())
1632916329
Diag(MD->getLocation(),
1633016330
diag::warn_objc_secondary_init_missing_init_call);
@@ -17876,7 +17876,7 @@ Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc,
1787617876
SkipBody->Previous = Def;
1787717877
makeMergedDefinitionVisible(Hidden);
1787817878
// Carry on and handle it like a normal definition. We'll
17879-
// skip starting the definitiion later.
17879+
// skip starting the definition later.
1788017880
}
1788117881
} else if (!IsExplicitSpecializationAfterInstantiation) {
1788217882
// A redeclaration in function prototype scope in C isn't
@@ -20475,7 +20475,7 @@ Sema::FunctionEmissionStatus Sema::getEmissionStatus(const FunctionDecl *FD,
2047520475
} else if (LangOpts.OpenMP > 45) {
2047620476
// In OpenMP host compilation prior to 5.0 everything was an emitted host
2047720477
// function. In 5.0, no_host was introduced which might cause a function to
20478-
// be ommitted.
20478+
// be omitted.
2047920479
std::optional<OMPDeclareTargetDeclAttr::DevTypeTy> DevTy =
2048020480
OMPDeclareTargetDeclAttr::getDeviceType(FD->getCanonicalDecl());
2048120481
if (DevTy)

0 commit comments

Comments
 (0)