diff options
author | Alp Toker <alp@nuanti.com> | 2013-12-05 16:25:25 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2013-12-05 16:25:25 +0000 |
commit | f6a24ce40fd5e807a5e71b17d0c04866e195fb87 (patch) | |
tree | 7cef755bd0df91b4b4b1267fb92e52a8a7953ded /clang/lib | |
parent | 4cc2b87375e4d7a9ffdd93434033b742074ed078 (diff) | |
download | bcm5719-llvm-f6a24ce40fd5e807a5e71b17d0c04866e195fb87.tar.gz bcm5719-llvm-f6a24ce40fd5e807a5e71b17d0c04866e195fb87.zip |
Fix a tranche of comment, test and doc typos
llvm-svn: 196510
Diffstat (limited to 'clang/lib')
34 files changed, 50 insertions, 49 deletions
diff --git a/clang/lib/ARCMigrate/ObjCMT.cpp b/clang/lib/ARCMigrate/ObjCMT.cpp index ac423c2f268..1615925eefc 100644 --- a/clang/lib/ARCMigrate/ObjCMT.cpp +++ b/clang/lib/ARCMigrate/ObjCMT.cpp @@ -418,7 +418,7 @@ static void rewriteToObjCProperty(const ObjCMethodDecl *Getter, // Get location past ';' EndLoc = EndLoc.getLocWithOffset(1); SourceLocation BeginOfSetterDclLoc = Setter->getLocStart(); - // FIXME. This assumes that setter decl; is immediately preceeded by eoln. + // FIXME. This assumes that setter decl; is immediately preceded by eoln. // It is trying to remove the setter method decl. line entirely. BeginOfSetterDclLoc = BeginOfSetterDclLoc.getLocWithOffset(-1); commit.remove(SourceRange(BeginOfSetterDclLoc, EndLoc)); @@ -606,7 +606,7 @@ static bool rewriteToNSEnumDecl(const EnumDecl *EnumDcl, /*IsDecl*/true); if (!EndOfEnumDclLoc.isInvalid()) { SourceLocation BeginOfEnumDclLoc = EnumDcl->getLocStart(); - // FIXME. This assumes that enum decl; is immediately preceeded by eoln. + // FIXME. This assumes that enum decl; is immediately preceded by eoln. // It is trying to remove the enum decl. lines entirely. BeginOfEnumDclLoc = BeginOfEnumDclLoc.getLocWithOffset(-1); commit.remove(SourceRange(BeginOfEnumDclLoc, EndOfEnumDclLoc)); @@ -1567,9 +1567,9 @@ IsReallyASystemHeader(ASTContext &Ctx, const FileEntry *file, FileID FID) { if (FI.getFileCharacteristic() == SrcMgr::C_ExternCSystem) return true; if (FI.getFileCharacteristic() == SrcMgr::C_System) { - // This file is in a system header directory. Continue with commiting change - // only if it is a user specified system directory because user put a - // .system_framework file in the framework directory. + // This file is in a system header directory. Continue committing + // change only if it's a user-specified system directory because user + // put a .system_framework file in the framework directory. StringRef Directory(file->getDir()->getName()); size_t Ix = Directory.rfind(".framework"); if (Ix == StringRef::npos) diff --git a/clang/lib/AST/DeclTemplate.cpp b/clang/lib/AST/DeclTemplate.cpp index df4a888d9d0..bab29cb1682 100644 --- a/clang/lib/AST/DeclTemplate.cpp +++ b/clang/lib/AST/DeclTemplate.cpp @@ -953,7 +953,7 @@ VarTemplateDecl *VarTemplateDecl::CreateDeserialized(ASTContext &C, return new (C, ID) VarTemplateDecl(EmptyShell()); } -// TODO: Unify accross class, function and variable templates? +// TODO: Unify across class, function and variable templates? // May require moving this and Common to RedeclarableTemplateDecl. void VarTemplateDecl::LoadLazySpecializations() const { Common *CommonPtr = getCommonPtr(); diff --git a/clang/lib/AST/RecordLayoutBuilder.cpp b/clang/lib/AST/RecordLayoutBuilder.cpp index cd5ce67f1d3..f0142525b1a 100644 --- a/clang/lib/AST/RecordLayoutBuilder.cpp +++ b/clang/lib/AST/RecordLayoutBuilder.cpp @@ -1985,7 +1985,7 @@ static bool isMsLayout(const RecordDecl* D) { // // * The alignment of bitfields in unions is ignored when computing the // alignment of the union. -// * The existance of zero-width bitfield that occurs after anything other than +// * The existence of zero-width bitfield that occurs after anything other than // a non-zero length bitfield is ignored. // * The Itanium equivalent vtable pointers are split into a vfptr (virtual // function pointer) and a vbptr (virtual base pointer). They can each be @@ -2036,7 +2036,7 @@ public: /// \brief Initializes size and alignment and honors some flags. void initializeLayout(const RecordDecl *RD); /// \brief Initialized C++ layout, compute alignment and virtual alignment and - /// existance of vfptrs and vbptrs. Alignment is needed before the vfptr is + /// existence of vfptrs and vbptrs. Alignment is needed before the vfptr is /// laid out. void initializeCXXLayout(const CXXRecordDecl *RD); void layoutVFPtr(const CXXRecordDecl *RD); @@ -2364,7 +2364,7 @@ MicrosoftRecordLayoutBuilder::layoutNonVirtualBase(const CXXRecordDecl *RD) { Bases.insert(std::make_pair(RD, BaseOffset)); Size = BaseOffset + Layout->getDataSize(); // Note: we don't update alignment here because it was accounted - // for during initalization. + // for during initialization. LastBaseWasEmpty = false; LastNonVirtualBaseHasVBPtr = Layout->hasVBPtr(); } diff --git a/clang/lib/Analysis/ThreadSafety.cpp b/clang/lib/Analysis/ThreadSafety.cpp index 8e02dba3a38..2ab8fefd32c 100644 --- a/clang/lib/Analysis/ThreadSafety.cpp +++ b/clang/lib/Analysis/ThreadSafety.cpp @@ -277,7 +277,7 @@ private: /// ensure that the original expression is a valid mutex expression. /// /// NDeref returns the number of Derefence and AddressOf operations - /// preceeding the Expr; this is used to decide whether to pretty-print + /// preceding the Expr; this is used to decide whether to pretty-print /// SExprs with . or ->. unsigned buildSExpr(const Expr *Exp, CallingContext* CallCtx, int* NDeref = 0) { diff --git a/clang/lib/Basic/DiagnosticIDs.cpp b/clang/lib/Basic/DiagnosticIDs.cpp index 9d99fbedd83..48e7317985e 100644 --- a/clang/lib/Basic/DiagnosticIDs.cpp +++ b/clang/lib/Basic/DiagnosticIDs.cpp @@ -111,7 +111,7 @@ static const StaticDiagInfoRec *GetDiagInfo(unsigned DiagID) { return 0; // Compute the index of the requested diagnostic in the static table. - // 1. Add the number of diagnostics in each category preceeding the + // 1. Add the number of diagnostics in each category preceding the // diagnostic and of the category the diagnostic is in. This gives us // the offset of the category in the table. // 2. Subtract the number of IDs in each category from our ID. This gives us diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 692f9a0dd63..3b5c8187530 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -53,7 +53,7 @@ static llvm::Constant *buildCopyHelper(CodeGenModule &CGM, return CodeGenFunction(CGM).GenerateCopyHelperFunction(blockInfo); } -/// Build the helper function to dipose of a block. +/// Build the helper function to dispose of a block. static llvm::Constant *buildDisposeHelper(CodeGenModule &CGM, const CGBlockInfo &blockInfo) { return CodeGenFunction(CGM).GenerateDestroyHelperFunction(blockInfo); diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp index cfb2d6291b8..2ba6edca43b 100644 --- a/clang/lib/CodeGen/CGCXX.cpp +++ b/clang/lib/CodeGen/CGCXX.cpp @@ -35,7 +35,7 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D) { return true; // Producing an alias to a base class ctor/dtor can degrade debug quality - // as the debugger cannot tell them appart. + // as the debugger cannot tell them apart. if (getCodeGenOpts().OptimizationLevel == 0) return true; @@ -107,7 +107,7 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl, if (!getCodeGenOpts().CXXCtorDtorAliases) return true; - // The alias will use the linkage of the referrent. If we can't + // The alias will use the linkage of the referent. If we can't // support aliases with that linkage, fail. llvm::GlobalValue::LinkageTypes Linkage = getFunctionLinkage(AliasDecl); @@ -130,7 +130,7 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl, llvm::PointerType *AliasType = getTypes().GetFunctionType(AliasDecl)->getPointerTo(); - // Find the referrent. Some aliases might require a bitcast, in + // Find the referent. Some aliases might require a bitcast, in // which case the caller is responsible for ensuring the soundness // of these semantics. llvm::GlobalValue *Ref = cast<llvm::GlobalValue>(GetAddrOfGlobal(TargetDecl)); @@ -143,7 +143,7 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl, if (llvm::GlobalValue::isDiscardableIfUnused(Linkage) && (TargetLinkage != llvm::GlobalValue::AvailableExternallyLinkage || !TargetDecl.getDecl()->hasAttr<AlwaysInlineAttr>())) { - // FIXME: An extern template instanciation will create functions with + // FIXME: An extern template instantiation will create functions with // linkage "AvailableExternally". In libc++, some classes also define // members with attribute "AlwaysInline" and expect no reference to // be generated. It is desirable to reenable this optimisation after diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 374cd026b85..e87be5f4148 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -823,7 +823,7 @@ void CodeGenFunction::EmitAutoVarDecl(const VarDecl &D) { } /// EmitAutoVarAlloca - Emit the alloca and debug information for a -/// local variable. Does not emit initalization or destruction. +/// local variable. Does not emit initialization or destruction. CodeGenFunction::AutoVarEmission CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) { QualType Ty = D.getType(); diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp index a7ab8507014..fbeb08ab514 100644 --- a/clang/lib/CodeGen/CGObjCGNU.cpp +++ b/clang/lib/CodeGen/CGObjCGNU.cpp @@ -2595,7 +2595,7 @@ llvm::Function *CGObjCGNU::ModuleInitFunction() { llvm::Constant::getNullValue(RegisterAlias->getType())); Builder.CreateCondBr(HasRegisterAlias, AliasBB, NoAliasBB); - // The true branch (has alias registration fucntion): + // The true branch (has alias registration function): Builder.SetInsertPoint(AliasBB); // Emit alias registration calls: for (std::vector<ClassAliasPair>::iterator iter = ClassAliases.begin(); diff --git a/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp b/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp index ab92563b21f..34cee377604 100644 --- a/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp +++ b/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp @@ -381,7 +381,7 @@ bool CGRecordLayoutBuilder::LayoutField(const FieldDecl *D, if (!Packed && D->hasAttr<PackedAttr>()) return false; - assert(!D->isBitField() && "Bitfields should be laid out seperately."); + assert(!D->isBitField() && "Bitfields should be laid out separately."); CheckZeroInitializable(D->getType()); diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp index ee928c5b590..6a45dba9975 100644 --- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp +++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp @@ -723,7 +723,7 @@ llvm::Value *MicrosoftCXXABI::adjustThisParameterInVirtualFunctionPrologue( // In this ABI, every virtual function takes a pointer to one of the // subobjects that first defines it as the 'this' parameter, rather than a - // pointer to ther final overrider subobject. Thus, we need to adjust it back + // pointer to the final overrider subobject. Thus, we need to adjust it back // to the final overrider subobject before use. // See comments in the MicrosoftVFTableContext implementation for the details. diff --git a/clang/lib/CodeGen/TargetInfo.h b/clang/lib/CodeGen/TargetInfo.h index f631f3102d0..b67b6853231 100644 --- a/clang/lib/CodeGen/TargetInfo.h +++ b/clang/lib/CodeGen/TargetInfo.h @@ -176,7 +176,7 @@ namespace clang { /// However, some platforms make the conventions identical except /// for passing additional out-of-band information to a variadic /// function: for example, x86-64 passes the number of SSE - /// arguments in %al. On these platforms, it is desireable to + /// arguments in %al. On these platforms, it is desirable to /// call unprototyped functions using the variadic convention so /// that unprototyped calls to varargs functions still succeed. /// diff --git a/clang/lib/Driver/SanitizerArgs.cpp b/clang/lib/Driver/SanitizerArgs.cpp index 43209f01e24..3ba87760067 100644 --- a/clang/lib/Driver/SanitizerArgs.cpp +++ b/clang/lib/Driver/SanitizerArgs.cpp @@ -123,7 +123,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, D.Diag(diag::err_drv_argument_not_allowed_with) << lastArgumentForKind(D, Args, NeedsLeakDetection) << lastArgumentForKind(D, Args, NeedsMsanRt); - // FIXME: Currenly -fsanitize=leak is silently ignored in the presence of + // FIXME: Currently -fsanitize=leak is silently ignored in the presence of // -fsanitize=address. Perhaps it should print an error, or perhaps // -f(-no)sanitize=leak should change whether leak detection is enabled by // default in ASan? diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 0472cdca397..bfc2acabe40 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -864,7 +864,7 @@ DerivedArgList *Darwin::TranslateArgs(const DerivedArgList &Args, // Check whether the target provides libc++. StringRef where; - // Complain about targetting iOS < 5.0 in any way. + // Complain about targeting iOS < 5.0 in any way. if (isTargetIPhoneOS() && isIPhoneOSVersionLT(5, 0)) where = "iOS 5.0"; @@ -2450,7 +2450,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) // <prefix>/<libdir>/gcc/<triple>/<version>. This decision is somewhat // debatable, but is the reality today. We need to search this tree even // when we have a sysroot somewhere else. It is the responsibility of - // whomever is doing the cross build targetting a sysroot using a GCC + // whomever is doing the cross build targeting a sysroot using a GCC // installation that is *not* within the system root to ensure two things: // // 1) Any DSOs that are linked in from this tree or from the install path diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 187ed38e38d..ae19be76082 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -6503,8 +6503,8 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA, if (OpenMP) { CmdArgs.push_back("-lgomp"); - // FIXME: Exclude this for platforms whith libgomp that doesn't require - // librt. Most modern Linux platfroms require it, but some may not. + // FIXME: Exclude this for platforms with libgomp that don't require + // librt. Most modern Linux platforms require it, but some may not. CmdArgs.push_back("-lrt"); } diff --git a/clang/lib/Format/BreakableToken.cpp b/clang/lib/Format/BreakableToken.cpp index a08102a3b78..29deff95699 100644 --- a/clang/lib/Format/BreakableToken.cpp +++ b/clang/lib/Format/BreakableToken.cpp @@ -335,7 +335,7 @@ void BreakableBlockComment::adjustWhitespace(unsigned LineIndex, LeadingWhitespace[LineIndex] = Lines[LineIndex].begin() - Lines[LineIndex - 1].end(); - // Adjust the start column uniformly accross all lines. + // Adjust the start column uniformly across all lines. StartOfLineColumn[LineIndex] = std::max<int>( 0, encoding::columnWidthWithTabs(Whitespace, 0, Style.TabWidth, Encoding) + diff --git a/clang/lib/Format/FormatToken.cpp b/clang/lib/Format/FormatToken.cpp index bab2425205c..748e2fd84a7 100644 --- a/clang/lib/Format/FormatToken.cpp +++ b/clang/lib/Format/FormatToken.cpp @@ -50,7 +50,7 @@ unsigned CommaSeparatedList::format(LineState &State, const ColumnFormat *Format = getColumnFormat(RemainingCodePoints); // If no ColumnFormat can be used, the braced list would generally be // bin-packed. Add a severe penalty to this so that column layouts are - // prefered if possible. + // preferred if possible. if (!Format) return 10000; diff --git a/clang/lib/Format/FormatToken.h b/clang/lib/Format/FormatToken.h index 5ac686183bc..a8d54ef2640 100644 --- a/clang/lib/Format/FormatToken.h +++ b/clang/lib/Format/FormatToken.h @@ -88,7 +88,7 @@ class TokenRole; class AnnotatedLine; /// \brief A wrapper around a \c Token storing information about the -/// whitespace characters preceeding it. +/// whitespace characters preceding it. struct FormatToken { FormatToken() : NewlinesBefore(0), HasUnescapedNewline(false), LastNewlineOffset(0), @@ -117,7 +117,7 @@ struct FormatToken { /// Token. bool HasUnescapedNewline; - /// \brief The range of the whitespace immediately preceeding the \c Token. + /// \brief The range of the whitespace immediately preceding the \c Token. SourceRange WhitespaceRange; /// \brief The offset just past the last '\n' in this token's leading diff --git a/clang/lib/Format/WhitespaceManager.h b/clang/lib/Format/WhitespaceManager.h index ae6202395f6..f94464ff38a 100644 --- a/clang/lib/Format/WhitespaceManager.h +++ b/clang/lib/Format/WhitespaceManager.h @@ -51,7 +51,7 @@ public: unsigned StartOfTokenColumn, bool InPPDirective = false); - /// \brief Adds information about an unchangable token's whitespace. + /// \brief Adds information about an unchangeable token's whitespace. /// /// Needs to be called for every token for which \c replaceWhitespace /// was not called. diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 20b8089fc68..dfa9ab2fe1a 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1139,7 +1139,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << A->getValue(); else { - // Valid standard, check to make sure language and standard are compatable. + // Valid standard, check to make sure language and standard are + // compatible. const LangStandard &Std = LangStandard::getLangStandardForKind(LangStd); switch (IK) { case IK_C: diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index a3ab1be4a97..b5f15830024 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -268,7 +268,7 @@ bool GenerateModuleAction::BeginSourceFileAction(CompilerInstance &CI, llvm::MemoryBuffer *InputBuffer = llvm::MemoryBuffer::getMemBufferCopy(HeaderContents, Module::getModuleInputBufferName()); - // Ownership of InputBuffer will be transfered to the SourceManager. + // Ownership of InputBuffer will be transferred to the SourceManager. setCurrentInput(FrontendInputFile(InputBuffer, getCurrentFileKind(), Module->IsSystem)); return true; diff --git a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp index 045e60add1f..77901a73e15 100644 --- a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp +++ b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp @@ -240,7 +240,7 @@ public: if (!EnsureStartOfWord // Check if string literal starts a new word. || P == Begin || isWhitespace(P[-1]) - // Or it could be preceeded by the start of a comment. + // Or it could be preceded by the start of a comment. || (P > (Begin + 1) && (P[-1] == '/' || P[-1] == '*') && P[-2] == '/')) return true; diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index 238474b93a4..29356d0fc74 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/lib/Parse/ParseObjc.cpp @@ -2931,7 +2931,7 @@ void Parser::ParseLexedObjCMethodDefs(LexedMethod &LM, bool parseMethod) { assert((Tok.is(tok::l_brace) || Tok.is(tok::kw_try) || Tok.is(tok::colon)) && "Inline objective-c method not starting with '{' or 'try' or ':'"); - // Enter a scope for the method or c-fucntion body. + // Enter a scope for the method or c-function body. ParseScope BodyScope(this, parseMethod ? Scope::ObjCMethodScope|Scope::FnScope|Scope::DeclScope diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp index 8026f78e80d..142386402df 100644 --- a/clang/lib/Parse/ParseStmt.cpp +++ b/clang/lib/Parse/ParseStmt.cpp @@ -2557,7 +2557,7 @@ StmtResult Parser::ParseCXXTryBlock() { /// /// [Borland] try-block: /// 'try' compound-statement seh-except-block -/// 'try' compound-statment seh-finally-block +/// 'try' compound-statement seh-finally-block /// StmtResult Parser::ParseCXXTryBlockCommon(SourceLocation TryLoc, bool FnTry) { if (Tok.isNot(tok::l_brace)) diff --git a/clang/lib/Rewrite/Core/HTMLRewrite.cpp b/clang/lib/Rewrite/Core/HTMLRewrite.cpp index 4da00a8cc97..1d6289eb9c6 100644 --- a/clang/lib/Rewrite/Core/HTMLRewrite.cpp +++ b/clang/lib/Rewrite/Core/HTMLRewrite.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // -// This file defines the HTMLRewriter clas, which is used to translate the +// This file defines the HTMLRewriter class, which is used to translate the // text of a source file into prettified HTML. // //===----------------------------------------------------------------------===// diff --git a/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp b/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp index c4ae3a8fc65..6ec37f80487 100644 --- a/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp +++ b/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp @@ -6046,9 +6046,9 @@ void RewriteModernObjC::HandleTranslationUnit(ASTContext &C) { RewriteInclude(); for (unsigned i = 0, e = FunctionDefinitionsSeen.size(); i < e; i++) { - // translation of function bodies were postponed untill all class and + // translation of function bodies were postponed until all class and // their extensions and implementations are seen. This is because, we - // cannot build grouping structs for bitfields untill they are all seen. + // cannot build grouping structs for bitfields until they are all seen. FunctionDecl *FDecl = FunctionDefinitionsSeen[i]; HandleTopLevelSingleDecl(FDecl); } diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 9e711c63321..7abbe7804c3 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -6785,7 +6785,7 @@ void Sema::checkUnsafeExprAssigns(SourceLocation Loc, Expr *LHS, Expr *RHS) { QualType LHSType; // PropertyRef on LHS type need be directly obtained from - // its declaration as it has a PsuedoType. + // its declaration as it has a PseudoType. ObjCPropertyRefExpr *PRE = dyn_cast<ObjCPropertyRefExpr>(LHS->IgnoreParens()); if (PRE && !PRE->isImplicitProperty()) { diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 451ebd254f3..10137a1095e 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -1170,7 +1170,7 @@ static bool IsDisallowedCopyOrAssign(const CXXMethodDecl *D) { // // When we see foo we don't know if after the typedef we will get 'A' or '*A' // for example. If 'A', foo will have external linkage. If we have '*A', -// foo will have no linkage. Since we can't know untill we get to the end +// foo will have no linkage. Since we can't know until we get to the end // of the typedef, this function finds out if D might have non-external linkage. // Callers should verify at the end of the TU if it D has external linkage or // not. @@ -10323,7 +10323,7 @@ bool Sema::isAcceptableTagRedeclaration(const TagDecl *Previous, << getRedeclDiagFromTagKind(OldTag); Diag(Redecl->getLocation(), diag::note_previous_use); - // If there is a previous defintion, suggest a fix-it. + // If there is a previous definition, suggest a fix-it. if (Previous->getDefinition()) { Diag(NewTagLoc, diag::note_struct_class_suggestion) << getRedeclDiagFromTagKind(Redecl->getTagKind()) diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 846aba89727..499b23f5efc 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -10326,7 +10326,7 @@ void Sema::DefineImplicitLambdaToFunctionPointerConversion( SynthesizedFunctionScope Scope(*this, Conv); DiagnosticErrorTrap Trap(Diags); - // Retreive the static invoker... + // Retrieve the static invoker... CXXMethodDecl *Invoker = Lambda->getLambdaStaticInvoker(); // ... and get the corresponding specialization for a generic lambda. if (Lambda->isGenericLambda()) { diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 00db12e22c3..e23c355823f 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1644,7 +1644,7 @@ Sema::BuildDeclRefExpr(ValueDecl *D, QualType Ty, ExprValueKind VK, NameInfo.getLoc(), Ty, VK, FoundD, TemplateArgs); } else { assert(!TemplateArgs && "No template arguments for non-variable" - " template specialization referrences"); + " template specialization references"); E = DeclRefExpr::Create( Context, SS ? SS->getWithLocInContext(Context) : NestedNameSpecifierLoc(), @@ -3461,7 +3461,7 @@ static bool CheckAlignOfExpr(Sema &S, Expr *E) { // delayed parsing --- except for trailing return types in C++11. // And if an id-expression referring to a field occurs in a // context that lacks a 'this' value, it's ill-formed --- except, - // agian, in C++11, where such references are allowed in an + // again, in C++11, where such references are allowed in an // unevaluated context. So C++11 introduces some new complexity. // // For the record, since __alignof__ on expressions is a GCC diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index 5faab1e083b..ba3c5e375df 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -3328,7 +3328,7 @@ static bool CheckObjCBridgeCFCast(Sema &S, QualType castType, Expr *castExpr) { } void Sema::CheckTollFreeBridgeCast(QualType castType, Expr *castExpr) { - // warn in presense of __bridge casting to or from a toll free bridge cast. + // warn in presence of __bridge casting to or from a toll free bridge cast. ARCConversionTypeClass exprACTC = classifyTypeForARCConversion(castExpr->getType()); ARCConversionTypeClass castACTC = classifyTypeForARCConversion(castType); if (castACTC == ACTC_retainable && exprACTC == ACTC_coreFoundation) { diff --git a/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp index 4ea07e29ebb..16007a9d912 100644 --- a/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp @@ -207,7 +207,7 @@ static bool IsZeroByteAllocation(ProgramStateRef state, // Generates an error report, indicating that the function whose name is given // will perform a zero byte allocation. -// Returns false if an error occured, true otherwise. +// Returns false if an error occurred, true otherwise. bool UnixAPIChecker::ReportZeroByteAllocation(CheckerContext &C, ProgramStateRef falseState, const Expr *arg, diff --git a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index e1a92b30c6b..7ee87f5509b 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -869,7 +869,7 @@ static const Expr *peelOffOuterExpr(const Expr *Ex, // Peel off the ternary operator. if (const ConditionalOperator *CO = dyn_cast<ConditionalOperator>(Ex)) { - // Find a node where the branching occured and find out which branch + // Find a node where the branching occurred and find out which branch // we took (true/false) by looking at the ExplodedGraph. const ExplodedNode *NI = N; do { diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp index 06328e4ffce..863dddaa6f5 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp @@ -49,7 +49,7 @@ void ExprEngine::processCallEnter(CallEnter CE, ExplodedNode *Pred) { assert(Entry->empty()); assert(Entry->succ_size() == 1); - // Get the solitary sucessor. + // Get the solitary successor. const CFGBlock *Succ = *(Entry->succ_begin()); // Construct an edge representing the starting location in the callee. |