Skip to content

Commit f6a24ce

Browse files
committed
Fix a tranche of comment, test and doc typos
llvm-svn: 196510
1 parent 4cc2b87 commit f6a24ce

Some content is hidden

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

63 files changed

+83
-82
lines changed

clang/bindings/python/clang/cindex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2501,7 +2501,7 @@ class CompilationDatabaseError(Exception):
25012501
constants in this class.
25022502
"""
25032503

2504-
# An unknown error occured
2504+
# An unknown error occurred
25052505
ERROR_UNKNOWN = 0
25062506

25072507
# The database could not be loaded

clang/lib/ARCMigrate/ObjCMT.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ static void rewriteToObjCProperty(const ObjCMethodDecl *Getter,
418418
// Get location past ';'
419419
EndLoc = EndLoc.getLocWithOffset(1);
420420
SourceLocation BeginOfSetterDclLoc = Setter->getLocStart();
421-
// FIXME. This assumes that setter decl; is immediately preceeded by eoln.
421+
// FIXME. This assumes that setter decl; is immediately preceded by eoln.
422422
// It is trying to remove the setter method decl. line entirely.
423423
BeginOfSetterDclLoc = BeginOfSetterDclLoc.getLocWithOffset(-1);
424424
commit.remove(SourceRange(BeginOfSetterDclLoc, EndLoc));
@@ -606,7 +606,7 @@ static bool rewriteToNSEnumDecl(const EnumDecl *EnumDcl,
606606
/*IsDecl*/true);
607607
if (!EndOfEnumDclLoc.isInvalid()) {
608608
SourceLocation BeginOfEnumDclLoc = EnumDcl->getLocStart();
609-
// FIXME. This assumes that enum decl; is immediately preceeded by eoln.
609+
// FIXME. This assumes that enum decl; is immediately preceded by eoln.
610610
// It is trying to remove the enum decl. lines entirely.
611611
BeginOfEnumDclLoc = BeginOfEnumDclLoc.getLocWithOffset(-1);
612612
commit.remove(SourceRange(BeginOfEnumDclLoc, EndOfEnumDclLoc));
@@ -1567,9 +1567,9 @@ IsReallyASystemHeader(ASTContext &Ctx, const FileEntry *file, FileID FID) {
15671567
if (FI.getFileCharacteristic() == SrcMgr::C_ExternCSystem)
15681568
return true;
15691569
if (FI.getFileCharacteristic() == SrcMgr::C_System) {
1570-
// This file is in a system header directory. Continue with commiting change
1571-
// only if it is a user specified system directory because user put a
1572-
// .system_framework file in the framework directory.
1570+
// This file is in a system header directory. Continue committing
1571+
// change only if it's a user-specified system directory because user
1572+
// put a .system_framework file in the framework directory.
15731573
StringRef Directory(file->getDir()->getName());
15741574
size_t Ix = Directory.rfind(".framework");
15751575
if (Ix == StringRef::npos)

clang/lib/AST/DeclTemplate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ VarTemplateDecl *VarTemplateDecl::CreateDeserialized(ASTContext &C,
953953
return new (C, ID) VarTemplateDecl(EmptyShell());
954954
}
955955

956-
// TODO: Unify accross class, function and variable templates?
956+
// TODO: Unify across class, function and variable templates?
957957
// May require moving this and Common to RedeclarableTemplateDecl.
958958
void VarTemplateDecl::LoadLazySpecializations() const {
959959
Common *CommonPtr = getCommonPtr();

clang/lib/AST/RecordLayoutBuilder.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,7 @@ static bool isMsLayout(const RecordDecl* D) {
19851985
//
19861986
// * The alignment of bitfields in unions is ignored when computing the
19871987
// alignment of the union.
1988-
// * The existance of zero-width bitfield that occurs after anything other than
1988+
// * The existence of zero-width bitfield that occurs after anything other than
19891989
// a non-zero length bitfield is ignored.
19901990
// * The Itanium equivalent vtable pointers are split into a vfptr (virtual
19911991
// function pointer) and a vbptr (virtual base pointer). They can each be
@@ -2036,7 +2036,7 @@ struct MicrosoftRecordLayoutBuilder {
20362036
/// \brief Initializes size and alignment and honors some flags.
20372037
void initializeLayout(const RecordDecl *RD);
20382038
/// \brief Initialized C++ layout, compute alignment and virtual alignment and
2039-
/// existance of vfptrs and vbptrs. Alignment is needed before the vfptr is
2039+
/// existence of vfptrs and vbptrs. Alignment is needed before the vfptr is
20402040
/// laid out.
20412041
void initializeCXXLayout(const CXXRecordDecl *RD);
20422042
void layoutVFPtr(const CXXRecordDecl *RD);
@@ -2364,7 +2364,7 @@ MicrosoftRecordLayoutBuilder::layoutNonVirtualBase(const CXXRecordDecl *RD) {
23642364
Bases.insert(std::make_pair(RD, BaseOffset));
23652365
Size = BaseOffset + Layout->getDataSize();
23662366
// Note: we don't update alignment here because it was accounted
2367-
// for during initalization.
2367+
// for during initialization.
23682368
LastBaseWasEmpty = false;
23692369
LastNonVirtualBaseHasVBPtr = Layout->hasVBPtr();
23702370
}

clang/lib/Analysis/ThreadSafety.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class SExpr {
277277
/// ensure that the original expression is a valid mutex expression.
278278
///
279279
/// NDeref returns the number of Derefence and AddressOf operations
280-
/// preceeding the Expr; this is used to decide whether to pretty-print
280+
/// preceding the Expr; this is used to decide whether to pretty-print
281281
/// SExprs with . or ->.
282282
unsigned buildSExpr(const Expr *Exp, CallingContext* CallCtx,
283283
int* NDeref = 0) {

clang/lib/Basic/DiagnosticIDs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static const StaticDiagInfoRec *GetDiagInfo(unsigned DiagID) {
111111
return 0;
112112

113113
// Compute the index of the requested diagnostic in the static table.
114-
// 1. Add the number of diagnostics in each category preceeding the
114+
// 1. Add the number of diagnostics in each category preceding the
115115
// diagnostic and of the category the diagnostic is in. This gives us
116116
// the offset of the category in the table.
117117
// 2. Subtract the number of IDs in each category from our ID. This gives us

clang/lib/CodeGen/CGBlocks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static llvm::Constant *buildCopyHelper(CodeGenModule &CGM,
5353
return CodeGenFunction(CGM).GenerateCopyHelperFunction(blockInfo);
5454
}
5555

56-
/// Build the helper function to dipose of a block.
56+
/// Build the helper function to dispose of a block.
5757
static llvm::Constant *buildDisposeHelper(CodeGenModule &CGM,
5858
const CGBlockInfo &blockInfo) {
5959
return CodeGenFunction(CGM).GenerateDestroyHelperFunction(blockInfo);

clang/lib/CodeGen/CGCXX.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D) {
3535
return true;
3636

3737
// Producing an alias to a base class ctor/dtor can degrade debug quality
38-
// as the debugger cannot tell them appart.
38+
// as the debugger cannot tell them apart.
3939
if (getCodeGenOpts().OptimizationLevel == 0)
4040
return true;
4141

@@ -107,7 +107,7 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl,
107107
if (!getCodeGenOpts().CXXCtorDtorAliases)
108108
return true;
109109

110-
// The alias will use the linkage of the referrent. If we can't
110+
// The alias will use the linkage of the referent. If we can't
111111
// support aliases with that linkage, fail.
112112
llvm::GlobalValue::LinkageTypes Linkage = getFunctionLinkage(AliasDecl);
113113

@@ -130,7 +130,7 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl,
130130
llvm::PointerType *AliasType
131131
= getTypes().GetFunctionType(AliasDecl)->getPointerTo();
132132

133-
// Find the referrent. Some aliases might require a bitcast, in
133+
// Find the referent. Some aliases might require a bitcast, in
134134
// which case the caller is responsible for ensuring the soundness
135135
// of these semantics.
136136
llvm::GlobalValue *Ref = cast<llvm::GlobalValue>(GetAddrOfGlobal(TargetDecl));
@@ -143,7 +143,7 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl,
143143
if (llvm::GlobalValue::isDiscardableIfUnused(Linkage) &&
144144
(TargetLinkage != llvm::GlobalValue::AvailableExternallyLinkage ||
145145
!TargetDecl.getDecl()->hasAttr<AlwaysInlineAttr>())) {
146-
// FIXME: An extern template instanciation will create functions with
146+
// FIXME: An extern template instantiation will create functions with
147147
// linkage "AvailableExternally". In libc++, some classes also define
148148
// members with attribute "AlwaysInline" and expect no reference to
149149
// be generated. It is desirable to reenable this optimisation after

clang/lib/CodeGen/CGDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ void CodeGenFunction::EmitAutoVarDecl(const VarDecl &D) {
823823
}
824824

825825
/// EmitAutoVarAlloca - Emit the alloca and debug information for a
826-
/// local variable. Does not emit initalization or destruction.
826+
/// local variable. Does not emit initialization or destruction.
827827
CodeGenFunction::AutoVarEmission
828828
CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) {
829829
QualType Ty = D.getType();

clang/lib/CodeGen/CGObjCGNU.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2595,7 +2595,7 @@ llvm::Function *CGObjCGNU::ModuleInitFunction() {
25952595
llvm::Constant::getNullValue(RegisterAlias->getType()));
25962596
Builder.CreateCondBr(HasRegisterAlias, AliasBB, NoAliasBB);
25972597

2598-
// The true branch (has alias registration fucntion):
2598+
// The true branch (has alias registration function):
25992599
Builder.SetInsertPoint(AliasBB);
26002600
// Emit alias registration calls:
26012601
for (std::vector<ClassAliasPair>::iterator iter = ClassAliases.begin();

0 commit comments

Comments
 (0)