Author: Nico Weber Date: 2024-06-11T14:00:24-04:00 New Revision: 9b4f8acf9dd1cd517f923c6de8274eed80879f6c
URL: https://github.com/llvm/llvm-project/commit/9b4f8acf9dd1cd517f923c6de8274eed80879f6c DIFF: https://github.com/llvm/llvm-project/commit/9b4f8acf9dd1cd517f923c6de8274eed80879f6c.diff LOG: [clang] Fix a few comment typos to cycle bots Added: Modified: clang/lib/Sema/SemaDecl.cpp Removed: ################################################################################ diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 4b9b735f1cfb4..95a6fe66babae 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -1493,7 +1493,7 @@ void Sema::ActOnExitFunctionContext() { /// /// This routine determines whether overloading is possible, not /// whether a new declaration actually overloads a previous one. -/// It will return true in C++ (where overloads are alway permitted) +/// It will return true in C++ (where overloads are always permitted) /// or, as a C extension, when either the new declaration or a /// previous one is declared with the 'overloadable' attribute. static bool AllowOverloadingOfFunction(const LookupResult &Previous, @@ -4147,7 +4147,7 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, // If we are merging two functions where only one of them has a prototype, // we may have enough information to decide to issue a diagnostic that the - // function without a protoype will change behavior in C23. This handles + // function without a prototype will change behavior in C23. This handles // cases like: // void i(); void i(int j); // void i(int j); void i(); @@ -10553,7 +10553,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, if (getLangOpts().CUDA && !isFunctionTemplateSpecialization) CUDA().maybeAddHostDeviceAttrs(NewFD, Previous); - // Handle explict specializations of function templates + // Handle explicit specializations of function templates // and friend function declarations with an explicit // template argument list. if (isFunctionTemplateSpecialization) { @@ -12601,7 +12601,7 @@ void Sema::CheckMSVCRTEntryPoint(FunctionDecl *FD) { if (FD->getName() != "DllMain") FD->setHasImplicitReturnZero(true); - // Explicity specified calling conventions are applied to MSVC entry points + // Explicitly specified calling conventions are applied to MSVC entry points if (!hasExplicitCallingConv(T)) { if (isDefaultStdCall(FD, *this)) { if (FT->getCallConv() != CC_X86StdCall) { @@ -13674,12 +13674,12 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { CreateRecoveryExpr(Init->getBeginLoc(), Init->getEndLoc(), Args); if (RecoveryExpr.get()) VDecl->setInit(RecoveryExpr.get()); - // In general, for error recovery purposes, the initalizer doesn't play + // In general, for error recovery purposes, the initializer doesn't play // part in the valid bit of the declaration. There are a few exceptions: // 1) if the var decl has a deduced auto type, and the type cannot be // deduced by an invalid initializer; - // 2) if the var decl is decompsition decl with a non-deduced type, and - // the initialization fails (e.g. `int [a] = {1, 2};`); + // 2) if the var decl is a decomposition decl with a non-deduced type, + // and the initialization fails (e.g. `int [a] = {1, 2};`); // Case 1) was already handled elsewhere. if (isa<DecompositionDecl>(VDecl)) // Case 2) VDecl->setInvalidDecl(); @@ -13897,9 +13897,9 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { } } else if (VDecl->isFileVarDecl()) { // In C, extern is typically used to avoid tentative definitions when - // declaring variables in headers, but adding an intializer makes it a + // declaring variables in headers, but adding an initializer makes it a // definition. This is somewhat confusing, so GCC and Clang both warn on it. - // In C++, extern is often used to give implictly static const variables + // In C++, extern is often used to give implicitly static const variables // external linkage, so don't warn in that case. If selectany is present, // this might be header code intended for C and C++ inclusion, so apply the // C++ rules. @@ -14093,7 +14093,7 @@ void Sema::ActOnUninitializedDecl(Decl *RealDecl) { return; } } - // The declaration is unitialized, no need for further checks. + // The declaration is uninitialized, no need for further checks. return; } @@ -16324,7 +16324,7 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, FSI->ObjCWarnForNoDesignatedInitChain = false; } if (FSI->ObjCWarnForNoInitDelegation) { - // Don't issue this warning for unavaialable inits. + // Don't issue this warning for unavailable inits. if (!MD->isUnavailable()) Diag(MD->getLocation(), diag::warn_objc_secondary_init_missing_init_call); @@ -17876,7 +17876,7 @@ Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SkipBody->Previous = Def; makeMergedDefinitionVisible(Hidden); // Carry on and handle it like a normal definition. We'll - // skip starting the definitiion later. + // skip starting the definition later. } } else if (!IsExplicitSpecializationAfterInstantiation) { // A redeclaration in function prototype scope in C isn't @@ -20475,7 +20475,7 @@ Sema::FunctionEmissionStatus Sema::getEmissionStatus(const FunctionDecl *FD, } else if (LangOpts.OpenMP > 45) { // In OpenMP host compilation prior to 5.0 everything was an emitted host // function. In 5.0, no_host was introduced which might cause a function to - // be ommitted. + // be omitted. std::optional<OMPDeclareTargetDeclAttr::DevTypeTy> DevTy = OMPDeclareTargetDeclAttr::getDeviceType(FD->getCanonicalDecl()); if (DevTy) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits