Skip to content

[clang][AST][NFC] fix spelling typos in clang AST files #141346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions clang/include/clang/AST/ASTContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
llvm::DenseMap<UsingEnumDecl *, UsingEnumDecl *>
InstantiatedFromUsingEnumDecl;

/// Simlarly maps instantiated UsingShadowDecls to their origin.
/// Similarly maps instantiated UsingShadowDecls to their origin.
llvm::DenseMap<UsingShadowDecl*, UsingShadowDecl*>
InstantiatedFromUsingShadowDecl;

Expand Down Expand Up @@ -790,7 +790,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
}
return new (*this) DeclListNode(ND);
}
/// Deallcates a \c DeclListNode by returning it to the \c ListNodeFreeList
/// Deallocates a \c DeclListNode by returning it to the \c ListNodeFreeList
/// pool.
void DeallocateDeclListNode(DeclListNode *N) {
N->Rest = ListNodeFreeList;
Expand Down Expand Up @@ -1123,7 +1123,7 @@ class ASTContext : public RefCountedBase<ASTContext> {

/// Clean up the merged definition list. Call this if you might have
/// added duplicates into the list.
void deduplicateMergedDefinitonsFor(NamedDecl *ND);
void deduplicateMergedDefinitionsFor(NamedDecl *ND);

/// Get the additional modules in which the definition \p Def has
/// been merged.
Expand Down Expand Up @@ -2565,7 +2565,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
/// Return the ABI-specified natural alignment of a (complete) type \p T,
/// before alignment adjustments, in bits.
///
/// This alignment is curently used only by ARM and AArch64 when passing
/// This alignment is currently used only by ARM and AArch64 when passing
/// arguments of a composite type.
unsigned getTypeUnadjustedAlign(QualType T) const {
return getTypeUnadjustedAlign(T.getTypePtr());
Expand Down Expand Up @@ -2638,7 +2638,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
/// considered specifically for the query.
CharUnits getAlignOfGlobalVarInChars(QualType T, const VarDecl *VD) const;

/// Return the minimum alignement as specified by the target. If \p VD is
/// Return the minimum alignment as specified by the target. If \p VD is
/// non-null it may be used to identify external or weak variables.
unsigned getMinGlobalAlignOfVar(uint64_t Size, const VarDecl *VD) const;

Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/AST/ASTImporterLookupTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class DeclContext;
// Example 2:
// // The fwd decl to Foo is not found in the lookupPtr of the DC of the
// // translation unit decl.
// // Here we could find the node by doing a traverse throught the list of
// // Here we could find the node by doing a traverse through the list of
// // the Decls in the DC, but that would not scale.
// struct A { struct Foo *p; };
// This is a severe problem because the importer decides if it has to create a
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/AST/AbstractBasicReader.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//==--- AbstractBasiceReader.h - Abstract basic value deserialization -----===//
//==--- AbstractBasicReader.h - Abstract basic value deserialization -----===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/AST/ASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ void ASTContext::mergeDefinitionIntoModule(NamedDecl *ND, Module *M,
MergedDefModules[cast<NamedDecl>(ND->getCanonicalDecl())].push_back(M);
}

void ASTContext::deduplicateMergedDefinitonsFor(NamedDecl *ND) {
void ASTContext::deduplicateMergedDefinitionsFor(NamedDecl *ND) {
auto It = MergedDefModules.find(cast<NamedDecl>(ND->getCanonicalDecl()));
if (It == MergedDefModules.end())
return;
Expand Down Expand Up @@ -1803,7 +1803,7 @@ CharUnits ASTContext::getDeclAlign(const Decl *D, bool ForAlignof) const {
Align = Target->getCharWidth();
}

// Ensure miminum alignment for global variables.
// Ensure minimum alignment for global variables.
if (const auto *VD = dyn_cast<VarDecl>(D))
if (VD->hasGlobalStorage() && !ForAlignof) {
uint64_t TypeSize =
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/AST/ASTImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2183,7 +2183,7 @@ Error ASTNodeImporter::ImportFieldDeclDefinition(const FieldDecl *From,
QualType FromType = From->getType();
QualType ToType = To->getType();
if (FromType->isArrayType()) {
// getBaseElementTypeUnsafe(...) handles multi-dimensonal arrays for us.
// getBaseElementTypeUnsafe(...) handles multi-dimensional arrays for us.
FromRecordDecl = FromType->getBaseElementTypeUnsafe()->getAsRecordDecl();
ToRecordDecl = ToType->getBaseElementTypeUnsafe()->getAsRecordDecl();
}
Expand Down Expand Up @@ -6105,7 +6105,7 @@ ExpectedDecl ASTNodeImporter::VisitClassTemplateDecl(ClassTemplateDecl *D) {
if (!hasSameVisibilityContextAndLinkage(FoundTemplate, D))
continue;

// FIXME: sufficient conditon for 'IgnoreTemplateParmDepth'?
// FIXME: sufficient condition for 'IgnoreTemplateParmDepth'?
bool IgnoreTemplateParmDepth =
(FoundTemplate->getFriendObjectKind() != Decl::FOK_None) !=
(D->getFriendObjectKind() != Decl::FOK_None);
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/AST/ASTStructuralEquivalence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ CheckStructurallyEquivalentAttributes(StructuralEquivalenceContext &Context,
// If either declaration has an attribute on it, we treat the declarations
// as not being structurally equivalent.
// FIXME: this should be handled on a case-by-case basis via tablegen in
// Attr.td. There are multiple cases to consider: one declation with the
// Attr.td. There are multiple cases to consider: one declaration with the
// attribute, another without it; different attribute syntax|spellings for
// the same semantic attribute, differences in attribute arguments, order
// in which attributes are applied, how to merge attributes if the types are
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Serialization/ASTReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10531,7 +10531,7 @@ void ASTReader::finishPendingActions() {

// Do some cleanup.
for (auto *ND : PendingMergedDefinitionsToDeduplicate)
getContext().deduplicateMergedDefinitonsFor(ND);
getContext().deduplicateMergedDefinitionsFor(ND);
PendingMergedDefinitionsToDeduplicate.clear();

// For each decl chain that we wanted to complete while deserializing, mark
Expand Down
Loading