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();

clang/lib/CodeGen/CGRecordLayoutBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ bool CGRecordLayoutBuilder::LayoutField(const FieldDecl *D,
381381
if (!Packed && D->hasAttr<PackedAttr>())
382382
return false;
383383

384-
assert(!D->isBitField() && "Bitfields should be laid out seperately.");
384+
assert(!D->isBitField() && "Bitfields should be laid out separately.");
385385

386386
CheckZeroInitializable(D->getType());
387387

clang/lib/CodeGen/MicrosoftCXXABI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ llvm::Value *MicrosoftCXXABI::adjustThisParameterInVirtualFunctionPrologue(
723723

724724
// In this ABI, every virtual function takes a pointer to one of the
725725
// subobjects that first defines it as the 'this' parameter, rather than a
726-
// pointer to ther final overrider subobject. Thus, we need to adjust it back
726+
// pointer to the final overrider subobject. Thus, we need to adjust it back
727727
// to the final overrider subobject before use.
728728
// See comments in the MicrosoftVFTableContext implementation for the details.
729729

clang/lib/CodeGen/TargetInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ namespace clang {
176176
/// However, some platforms make the conventions identical except
177177
/// for passing additional out-of-band information to a variadic
178178
/// function: for example, x86-64 passes the number of SSE
179-
/// arguments in %al. On these platforms, it is desireable to
179+
/// arguments in %al. On these platforms, it is desirable to
180180
/// call unprototyped functions using the variadic convention so
181181
/// that unprototyped calls to varargs functions still succeed.
182182
///

clang/lib/Driver/SanitizerArgs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
123123
D.Diag(diag::err_drv_argument_not_allowed_with)
124124
<< lastArgumentForKind(D, Args, NeedsLeakDetection)
125125
<< lastArgumentForKind(D, Args, NeedsMsanRt);
126-
// FIXME: Currenly -fsanitize=leak is silently ignored in the presence of
126+
// FIXME: Currently -fsanitize=leak is silently ignored in the presence of
127127
// -fsanitize=address. Perhaps it should print an error, or perhaps
128128
// -f(-no)sanitize=leak should change whether leak detection is enabled by
129129
// default in ASan?

clang/lib/Driver/ToolChains.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ DerivedArgList *Darwin::TranslateArgs(const DerivedArgList &Args,
864864
// Check whether the target provides libc++.
865865
StringRef where;
866866

867-
// Complain about targetting iOS < 5.0 in any way.
867+
// Complain about targeting iOS < 5.0 in any way.
868868
if (isTargetIPhoneOS() && isIPhoneOSVersionLT(5, 0))
869869
where = "iOS 5.0";
870870

@@ -2450,7 +2450,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
24502450
// <prefix>/<libdir>/gcc/<triple>/<version>. This decision is somewhat
24512451
// debatable, but is the reality today. We need to search this tree even
24522452
// when we have a sysroot somewhere else. It is the responsibility of
2453-
// whomever is doing the cross build targetting a sysroot using a GCC
2453+
// whomever is doing the cross build targeting a sysroot using a GCC
24542454
// installation that is *not* within the system root to ensure two things:
24552455
//
24562456
// 1) Any DSOs that are linked in from this tree or from the install path

clang/lib/Driver/Tools.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6503,8 +6503,8 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA,
65036503
if (OpenMP) {
65046504
CmdArgs.push_back("-lgomp");
65056505

6506-
// FIXME: Exclude this for platforms whith libgomp that doesn't require
6507-
// librt. Most modern Linux platfroms require it, but some may not.
6506+
// FIXME: Exclude this for platforms with libgomp that don't require
6507+
// librt. Most modern Linux platforms require it, but some may not.
65086508
CmdArgs.push_back("-lrt");
65096509
}
65106510

clang/lib/Format/BreakableToken.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ void BreakableBlockComment::adjustWhitespace(unsigned LineIndex,
335335
LeadingWhitespace[LineIndex] =
336336
Lines[LineIndex].begin() - Lines[LineIndex - 1].end();
337337

338-
// Adjust the start column uniformly accross all lines.
338+
// Adjust the start column uniformly across all lines.
339339
StartOfLineColumn[LineIndex] = std::max<int>(
340340
0,
341341
encoding::columnWidthWithTabs(Whitespace, 0, Style.TabWidth, Encoding) +

clang/lib/Format/FormatToken.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ unsigned CommaSeparatedList::format(LineState &State,
5050
const ColumnFormat *Format = getColumnFormat(RemainingCodePoints);
5151
// If no ColumnFormat can be used, the braced list would generally be
5252
// bin-packed. Add a severe penalty to this so that column layouts are
53-
// prefered if possible.
53+
// preferred if possible.
5454
if (!Format)
5555
return 10000;
5656

clang/lib/Format/FormatToken.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class TokenRole;
8888
class AnnotatedLine;
8989

9090
/// \brief A wrapper around a \c Token storing information about the
91-
/// whitespace characters preceeding it.
91+
/// whitespace characters preceding it.
9292
struct FormatToken {
9393
FormatToken()
9494
: NewlinesBefore(0), HasUnescapedNewline(false), LastNewlineOffset(0),
@@ -117,7 +117,7 @@ struct FormatToken {
117117
/// Token.
118118
bool HasUnescapedNewline;
119119

120-
/// \brief The range of the whitespace immediately preceeding the \c Token.
120+
/// \brief The range of the whitespace immediately preceding the \c Token.
121121
SourceRange WhitespaceRange;
122122

123123
/// \brief The offset just past the last '\n' in this token's leading

clang/lib/Format/WhitespaceManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class WhitespaceManager {
5151
unsigned StartOfTokenColumn,
5252
bool InPPDirective = false);
5353

54-
/// \brief Adds information about an unchangable token's whitespace.
54+
/// \brief Adds information about an unchangeable token's whitespace.
5555
///
5656
/// Needs to be called for every token for which \c replaceWhitespace
5757
/// was not called.

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
11391139
Diags.Report(diag::err_drv_invalid_value)
11401140
<< A->getAsString(Args) << A->getValue();
11411141
else {
1142-
// Valid standard, check to make sure language and standard are compatable.
1142+
// Valid standard, check to make sure language and standard are
1143+
// compatible.
11431144
const LangStandard &Std = LangStandard::getLangStandardForKind(LangStd);
11441145
switch (IK) {
11451146
case IK_C:

clang/lib/Frontend/FrontendActions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ bool GenerateModuleAction::BeginSourceFileAction(CompilerInstance &CI,
268268
llvm::MemoryBuffer *InputBuffer =
269269
llvm::MemoryBuffer::getMemBufferCopy(HeaderContents,
270270
Module::getModuleInputBufferName());
271-
// Ownership of InputBuffer will be transfered to the SourceManager.
271+
// Ownership of InputBuffer will be transferred to the SourceManager.
272272
setCurrentInput(FrontendInputFile(InputBuffer, getCurrentFileKind(),
273273
Module->IsSystem));
274274
return true;

clang/lib/Frontend/VerifyDiagnosticConsumer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class ParseHelper
240240
if (!EnsureStartOfWord
241241
// Check if string literal starts a new word.
242242
|| P == Begin || isWhitespace(P[-1])
243-
// Or it could be preceeded by the start of a comment.
243+
// Or it could be preceded by the start of a comment.
244244
|| (P > (Begin + 1) && (P[-1] == '/' || P[-1] == '*')
245245
&& P[-2] == '/'))
246246
return true;

clang/lib/Parse/ParseObjc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2931,7 +2931,7 @@ void Parser::ParseLexedObjCMethodDefs(LexedMethod &LM, bool parseMethod) {
29312931
assert((Tok.is(tok::l_brace) || Tok.is(tok::kw_try) ||
29322932
Tok.is(tok::colon)) &&
29332933
"Inline objective-c method not starting with '{' or 'try' or ':'");
2934-
// Enter a scope for the method or c-fucntion body.
2934+
// Enter a scope for the method or c-function body.
29352935
ParseScope BodyScope(this,
29362936
parseMethod
29372937
? Scope::ObjCMethodScope|Scope::FnScope|Scope::DeclScope

clang/lib/Parse/ParseStmt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2557,7 +2557,7 @@ StmtResult Parser::ParseCXXTryBlock() {
25572557
///
25582558
/// [Borland] try-block:
25592559
/// 'try' compound-statement seh-except-block
2560-
/// 'try' compound-statment seh-finally-block
2560+
/// 'try' compound-statement seh-finally-block
25612561
///
25622562
StmtResult Parser::ParseCXXTryBlockCommon(SourceLocation TryLoc, bool FnTry) {
25632563
if (Tok.isNot(tok::l_brace))

clang/lib/Rewrite/Core/HTMLRewrite.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88
//===----------------------------------------------------------------------===//
99
//
10-
// This file defines the HTMLRewriter clas, which is used to translate the
10+
// This file defines the HTMLRewriter class, which is used to translate the
1111
// text of a source file into prettified HTML.
1212
//
1313
//===----------------------------------------------------------------------===//

clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6046,9 +6046,9 @@ void RewriteModernObjC::HandleTranslationUnit(ASTContext &C) {
60466046
RewriteInclude();
60476047

60486048
for (unsigned i = 0, e = FunctionDefinitionsSeen.size(); i < e; i++) {
6049-
// translation of function bodies were postponed untill all class and
6049+
// translation of function bodies were postponed until all class and
60506050
// their extensions and implementations are seen. This is because, we
6051-
// cannot build grouping structs for bitfields untill they are all seen.
6051+
// cannot build grouping structs for bitfields until they are all seen.
60526052
FunctionDecl *FDecl = FunctionDefinitionsSeen[i];
60536053
HandleTopLevelSingleDecl(FDecl);
60546054
}

clang/lib/Sema/SemaChecking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6785,7 +6785,7 @@ void Sema::checkUnsafeExprAssigns(SourceLocation Loc,
67856785
Expr *LHS, Expr *RHS) {
67866786
QualType LHSType;
67876787
// PropertyRef on LHS type need be directly obtained from
6788-
// its declaration as it has a PsuedoType.
6788+
// its declaration as it has a PseudoType.
67896789
ObjCPropertyRefExpr *PRE
67906790
= dyn_cast<ObjCPropertyRefExpr>(LHS->IgnoreParens());
67916791
if (PRE && !PRE->isImplicitProperty()) {

clang/lib/Sema/SemaDecl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ static bool IsDisallowedCopyOrAssign(const CXXMethodDecl *D) {
11701170
//
11711171
// When we see foo we don't know if after the typedef we will get 'A' or '*A'
11721172
// for example. If 'A', foo will have external linkage. If we have '*A',
1173-
// foo will have no linkage. Since we can't know untill we get to the end
1173+
// foo will have no linkage. Since we can't know until we get to the end
11741174
// of the typedef, this function finds out if D might have non-external linkage.
11751175
// Callers should verify at the end of the TU if it D has external linkage or
11761176
// not.
@@ -10323,7 +10323,7 @@ bool Sema::isAcceptableTagRedeclaration(const TagDecl *Previous,
1032310323
<< getRedeclDiagFromTagKind(OldTag);
1032410324
Diag(Redecl->getLocation(), diag::note_previous_use);
1032510325

10326-
// If there is a previous defintion, suggest a fix-it.
10326+
// If there is a previous definition, suggest a fix-it.
1032710327
if (Previous->getDefinition()) {
1032810328
Diag(NewTagLoc, diag::note_struct_class_suggestion)
1032910329
<< getRedeclDiagFromTagKind(Redecl->getTagKind())

clang/lib/Sema/SemaDeclCXX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10326,7 +10326,7 @@ void Sema::DefineImplicitLambdaToFunctionPointerConversion(
1032610326
SynthesizedFunctionScope Scope(*this, Conv);
1032710327
DiagnosticErrorTrap Trap(Diags);
1032810328

10329-
// Retreive the static invoker...
10329+
// Retrieve the static invoker...
1033010330
CXXMethodDecl *Invoker = Lambda->getLambdaStaticInvoker();
1033110331
// ... and get the corresponding specialization for a generic lambda.
1033210332
if (Lambda->isGenericLambda()) {

clang/lib/Sema/SemaExpr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,7 @@ Sema::BuildDeclRefExpr(ValueDecl *D, QualType Ty, ExprValueKind VK,
16441644
NameInfo.getLoc(), Ty, VK, FoundD, TemplateArgs);
16451645
} else {
16461646
assert(!TemplateArgs && "No template arguments for non-variable"
1647-
" template specialization referrences");
1647+
" template specialization references");
16481648
E = DeclRefExpr::Create(
16491649
Context,
16501650
SS ? SS->getWithLocInContext(Context) : NestedNameSpecifierLoc(),
@@ -3461,7 +3461,7 @@ static bool CheckAlignOfExpr(Sema &S, Expr *E) {
34613461
// delayed parsing --- except for trailing return types in C++11.
34623462
// And if an id-expression referring to a field occurs in a
34633463
// context that lacks a 'this' value, it's ill-formed --- except,
3464-
// agian, in C++11, where such references are allowed in an
3464+
// again, in C++11, where such references are allowed in an
34653465
// unevaluated context. So C++11 introduces some new complexity.
34663466
//
34673467
// For the record, since __alignof__ on expressions is a GCC

0 commit comments

Comments
 (0)