}
void ASTDeclWriter::VisitTagDecl(TagDecl *D) {
+ static_assert(DeclContext::NumTagDeclBits == 10,
+ "You need to update the serializer after you change the "
+ "TagDeclBits");
+
VisitRedeclarable(D);
VisitTypeDecl(D);
Record.push_back(D->getIdentifierNamespace());
}
void ASTDeclWriter::VisitEnumDecl(EnumDecl *D) {
+ static_assert(DeclContext::NumEnumDeclBits == 20,
+ "You need to update the serializer after you change the "
+ "EnumDeclBits");
+
VisitTagDecl(D);
Record.AddTypeSourceInfo(D->getIntegerTypeSourceInfo());
if (!D->getIntegerTypeSourceInfo())
}
void ASTDeclWriter::VisitRecordDecl(RecordDecl *D) {
+ static_assert(DeclContext::NumRecordDeclBits == 41,
+ "You need to update the serializer after you change the "
+ "RecordDeclBits");
+
VisitTagDecl(D);
Record.push_back(D->hasFlexibleArrayMember());
Record.push_back(D->isAnonymousStructOrUnion());
}
void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) {
+ static_assert(DeclContext::NumFunctionDeclBits == 29,
+ "You need to update the serializer after you change the "
+ "FunctionDeclBits");
+
VisitRedeclarable(D);
Record.push_back(D->getTemplatedKind());
}
void ASTDeclWriter::VisitObjCMethodDecl(ObjCMethodDecl *D) {
+ static_assert(DeclContext::NumObjCMethodDeclBits == 24,
+ "You need to update the serializer after you change the "
+ "ObjCMethodDeclBits");
+
VisitNamedDecl(D);
// FIXME: convert to LazyStmtPtr?
// Unlike C/C++, method bodies will never be in header files.
}
void ASTDeclWriter::VisitObjCContainerDecl(ObjCContainerDecl *D) {
+ static_assert(DeclContext::NumObjCContainerDeclBits == 51,
+ "You need to update the serializer after you change the "
+ "ObjCContainerDeclBits");
+
VisitNamedDecl(D);
Record.AddSourceLocation(D->getAtStartLoc());
Record.AddSourceRange(D->getAtEndRange());
}
void ASTDeclWriter::VisitLinkageSpecDecl(LinkageSpecDecl *D) {
+ static_assert(DeclContext::NumLinkageSpecDeclBits == 4,
+ "You need to update the serializer after you change the"
+ "LinkageSpecDeclBits");
+
VisitDecl(D);
Record.push_back(D->getLanguage());
Record.AddSourceLocation(D->getExternLoc());
}
void ASTDeclWriter::VisitCXXConstructorDecl(CXXConstructorDecl *D) {
+ static_assert(DeclContext::NumCXXConstructorDeclBits == 22,
+ "You need to update the serializer after you change the "
+ "CXXConstructorDeclBits");
+
Record.push_back(D->getTrailingAllocKind());
addExplicitSpecifier(D->getExplicitSpecifier(), Record);
if (auto Inherited = D->getInheritedConstructor()) {
/// Emit the DeclContext part of a declaration context decl.
void ASTDeclWriter::VisitDeclContext(DeclContext *DC) {
+ static_assert(DeclContext::NumDeclContextBits == 13,
+ "You need to update the serializer after you change the "
+ "DeclContextBits");
+
Record.AddOffset(Writer.WriteDeclContextLexicalBlock(Context, DC));
Record.AddOffset(Writer.WriteDeclContextVisibleBlock(Context, DC));
}
}
void ASTDeclWriter::VisitOMPDeclareReductionDecl(OMPDeclareReductionDecl *D) {
+ static_assert(DeclContext::NumOMPDeclareReductionDeclBits == 2,
+ "You need to update the serializer after you change the "
+ "NumOMPDeclareReductionDeclBits");
+
VisitValueDecl(D);
Record.AddSourceLocation(D->getBeginLoc());
Record.AddStmt(D->getCombinerIn());