[clang] ab7316f - [clang] Spell correct variable
Nathan Sidwell via cfe-commits
cfe-commits at lists.llvm.org
Mon May 3 05:33:55 PDT 2021
Author: Nathan Sidwell
Date: 2021-05-03T05:33:47-07:00
New Revision: ab7316f1c64c3530a6eca2e449c2dd734e83498e
URL: https://github.com/llvm/llvm-project/commit/ab7316f1c64c3530a6eca2e449c2dd734e83498e
DIFF: https://github.com/llvm/llvm-project/commit/ab7316f1c64c3530a6eca2e449c2dd734e83498e.diff
LOG: [clang] Spell correct variable
fix Trailling -> Trailing (two ll-> one l)
Differential Revision: https://reviews.llvm.org/D101753
Added:
Modified:
clang/include/clang/AST/DeclCXX.h
clang/lib/AST/DeclCXX.cpp
clang/lib/Serialization/ASTWriterDecl.cpp
clang/test/SemaCXX/cxx2a-explicit-bool.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/AST/DeclCXX.h b/clang/include/clang/AST/DeclCXX.h
index bbf7ecf6712a3..d90732b1d0ca9 100644
--- a/clang/include/clang/AST/DeclCXX.h
+++ b/clang/include/clang/AST/DeclCXX.h
@@ -2425,12 +2425,12 @@ class CXXConstructorDecl final
: ExplicitSpecKind::ResolvedFalse);
}
- enum TraillingAllocKind {
+ enum TrailingAllocKind {
TAKInheritsConstructor = 1,
TAKHasTailExplicit = 1 << 1,
};
- uint64_t getTraillingAllocKind() const {
+ uint64_t getTrailingAllocKind() const {
return numTrailingObjects(OverloadToken<InheritedConstructor>()) |
(numTrailingObjects(OverloadToken<ExplicitSpecifier>()) << 1);
}
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index f22e599225b60..081c9ebf8622d 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -2600,19 +2600,19 @@ void CXXConstructorDecl::anchor() {}
CXXConstructorDecl *CXXConstructorDecl::CreateDeserialized(ASTContext &C,
unsigned ID,
uint64_t AllocKind) {
- bool hasTraillingExplicit = static_cast<bool>(AllocKind & TAKHasTailExplicit);
+ bool hasTrailingExplicit = static_cast<bool>(AllocKind & TAKHasTailExplicit);
bool isInheritingConstructor =
static_cast<bool>(AllocKind & TAKInheritsConstructor);
unsigned Extra =
additionalSizeToAlloc<InheritedConstructor, ExplicitSpecifier>(
- isInheritingConstructor, hasTraillingExplicit);
+ isInheritingConstructor, hasTrailingExplicit);
auto *Result = new (C, ID, Extra) CXXConstructorDecl(
C, nullptr, SourceLocation(), DeclarationNameInfo(), QualType(), nullptr,
ExplicitSpecifier(), false, false, ConstexprSpecKind::Unspecified,
InheritedConstructor(), nullptr);
Result->setInheritingConstructor(isInheritingConstructor);
Result->CXXConstructorDeclBits.HasTrailingExplicitSpecifier =
- hasTraillingExplicit;
+ hasTrailingExplicit;
Result->setExplicitSpecifier(ExplicitSpecifier());
return Result;
}
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp
index 2b8278090b058..0a5a846bd05c2 100644
--- a/clang/lib/Serialization/ASTWriterDecl.cpp
+++ b/clang/lib/Serialization/ASTWriterDecl.cpp
@@ -1389,7 +1389,7 @@ void ASTDeclWriter::VisitCXXMethodDecl(CXXMethodDecl *D) {
}
void ASTDeclWriter::VisitCXXConstructorDecl(CXXConstructorDecl *D) {
- Record.push_back(D->getTraillingAllocKind());
+ Record.push_back(D->getTrailingAllocKind());
addExplicitSpecifier(D->getExplicitSpecifier(), Record);
if (auto Inherited = D->getInheritedConstructor()) {
Record.AddDeclRef(Inherited.getShadowDecl());
diff --git a/clang/test/SemaCXX/cxx2a-explicit-bool.cpp b/clang/test/SemaCXX/cxx2a-explicit-bool.cpp
index c9e960f2d3db7..5a9ff0e442dae 100644
--- a/clang/test/SemaCXX/cxx2a-explicit-bool.cpp
+++ b/clang/test/SemaCXX/cxx2a-explicit-bool.cpp
@@ -84,7 +84,7 @@ E<void> e = 1;
}
-namespace trailling_object {
+namespace trailing_object {
template<bool b>
struct B {
More information about the cfe-commits
mailing list