Index: clang/include/clang/AST/DeclCXX.h =================================================================== --- clang/include/clang/AST/DeclCXX.h +++ clang/include/clang/AST/DeclCXX.h @@ -2425,12 +2425,12 @@ : ExplicitSpecKind::ResolvedFalse); } - enum TraillingAllocKind { + enum TrailingAllocKind { TAKInheritsConstructor = 1, TAKHasTailExplicit = 1 << 1, }; - uint64_t getTraillingAllocKind() const { + uint64_t getTrailingAllocKind() const { return numTrailingObjects(OverloadToken()) | (numTrailingObjects(OverloadToken()) << 1); } Index: clang/lib/AST/DeclCXX.cpp =================================================================== --- clang/lib/AST/DeclCXX.cpp +++ clang/lib/AST/DeclCXX.cpp @@ -2600,19 +2600,19 @@ CXXConstructorDecl *CXXConstructorDecl::CreateDeserialized(ASTContext &C, unsigned ID, uint64_t AllocKind) { - bool hasTraillingExplicit = static_cast(AllocKind & TAKHasTailExplicit); + bool hasTrailingExplicit = static_cast(AllocKind & TAKHasTailExplicit); bool isInheritingConstructor = static_cast(AllocKind & TAKInheritsConstructor); unsigned Extra = additionalSizeToAlloc( - 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; } Index: clang/lib/Serialization/ASTWriterDecl.cpp =================================================================== --- clang/lib/Serialization/ASTWriterDecl.cpp +++ clang/lib/Serialization/ASTWriterDecl.cpp @@ -1389,7 +1389,7 @@ } 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()); Index: clang/test/SemaCXX/cxx2a-explicit-bool.cpp =================================================================== --- clang/test/SemaCXX/cxx2a-explicit-bool.cpp +++ clang/test/SemaCXX/cxx2a-explicit-bool.cpp @@ -84,7 +84,7 @@ } -namespace trailling_object { +namespace trailing_object { template struct B {