<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Richard,<div class=""><br class=""></div><div class="">it's possible that this broke the module build<div class=""><br class=""></div><div class=""><a href="http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/2482/consoleFull#-432653710a1ca8a51-895e-46c6-af87-ce24fa4cd561" class="">http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/2482/consoleFull#-432653710a1ca8a51-895e-46c6-af87-ce24fa4cd561</a></div><div class=""><br class=""></div><div class=""><span style="caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap;" class="">/Users/buildslave/jenkins/workspace/lldb-cmake/host-compiler/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/lib/Parse -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/lib/Parse -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include -Itools/clang/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/libxml2 -Iinclude -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include -Wdocumentation -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++14 -fmodules -fmodules-cache-path=/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/module.cache -fcxx-modules -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -UNDEBUG -fno-exceptions -fno-rtti -MD -MT tools/clang/lib/Parse/CMakeFiles/obj.clangParse.dir/ParseAST.cpp.o -MF tools/clang/lib/Parse/CMakeFiles/obj.clangParse.dir/ParseAST.cpp.o.d -o tools/clang/lib/Parse/CMakeFiles/obj.clangParse.dir/ParseAST.cpp.o -c /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/lib/Parse/ParseAST.cpp
While building module 'Clang_Parse' imported from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/lib/Parse/ParseAST.cpp:13:
While building module 'Clang_AST' imported from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Parse/Parser.h:16:
In file included from <module-includes>:1:
In file included from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/AST/ASTNodeTraverser.h:20:
In file included from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/AST/DeclVisitor.h:18:
</span><a id="-195153937449ba4694-19c4-4d7e-bec5-911270d8a58c" style="box-sizing: border-box; word-wrap: break-word; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; display: block; position: relative; top: -2em; visibility: hidden;" class=""></a><span title="Compile Error" style="box-sizing: border-box; font-family: monospace; font-size: 13px; white-space: pre-wrap; color: white; background-color: red;" class="">/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/AST/DeclCXX.h:282:5: fatal error: import of module 'Clang_AST.CXXRecordDeclDefinitionBits' appears within 'clang::CXXRecordDecl::DefinitionData'
</span><span style="caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap;" class=""> #include "CXXRecordDeclDefinitionBits.def"
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/AST/DeclCXX.h:279:3: note: 'clang::CXXRecordDecl::DefinitionData' begins here
struct DefinitionData {
^
While building module 'Clang_Parse' imported from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/lib/Parse/ParseAST.cpp:13:
In file included from <module-includes>:1:
In file included from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Parse/RAIIObjectsForParser.h:18:
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Parse/Parser.h:16:10: fatal error: could not build module 'Clang_AST'
#include "clang/AST/OpenMPClause.h"
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
While building module 'Clang_Parse' imported from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/lib/Parse/ParseAST.cpp:13:
While building module 'Clang_Sema' imported from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Parse/Parser.h:24:
In file included from <module-includes>:1:
In file included from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Sema/MultiplexExternalSemaSource.h:15:
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Sema/ExternalSemaSource.h:15:10: fatal error: could not build module 'Clang_AST'
#include "clang/AST/ExternalASTSource.h"
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/lib/Parse/ParseAST.cpp:13:10: fatal error: could not build module 'Clang_Parse'
#include "clang/Parse/ParseAST.h"
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.</span><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 10, 2019, at 5:29 PM, Richard Smith via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Author: rsmith<br class="">Date: Thu Oct 10 17:29:04 2019<br class="">New Revision: 374484<br class=""><br class="">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=374484&view=rev" class="">http://llvm.org/viewvc/llvm-project?rev=374484&view=rev</a><br class="">Log:<br class="">Move most CXXRecordDecl::DefinitionData bit-fields out into a separate<br class="">file.<br class=""><br class="">Reduces duplication and thereby reduces the risk that someone will<br class="">forget to update one of these places, as I did when adding<br class="">DefaultedDestructorIsConstexpr (though I've been unable to produce<br class="">a testcase for which that matters so far).<br class=""><br class="">Added:<br class=""> cfe/trunk/include/clang/AST/CXXRecordDeclDefinitionBits.def<br class="">Modified:<br class=""> cfe/trunk/include/clang/AST/DeclCXX.h<br class=""> cfe/trunk/lib/AST/ASTImporter.cpp<br class=""> cfe/trunk/lib/AST/DeclCXX.cpp<br class=""> cfe/trunk/lib/Serialization/ASTReaderDecl.cpp<br class=""> cfe/trunk/lib/Serialization/ASTWriter.cpp<br class=""><br class="">Added: cfe/trunk/include/clang/AST/CXXRecordDeclDefinitionBits.def<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CXXRecordDeclDefinitionBits.def?rev=374484&view=auto" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CXXRecordDeclDefinitionBits.def?rev=374484&view=auto</a><br class="">==============================================================================<br class="">--- cfe/trunk/include/clang/AST/CXXRecordDeclDefinitionBits.def (added)<br class="">+++ cfe/trunk/include/clang/AST/CXXRecordDeclDefinitionBits.def Thu Oct 10 17:29:04 2019<br class="">@@ -0,0 +1,236 @@<br class="">+//===-- CXXRecordDeclDefinitionBits.def - Class definition bits -*- C++ -*-===//<br class="">+//<br class="">+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.<br class="">+// See <a href="https://llvm.org/LICENSE.txt" class="">https://llvm.org/LICENSE.txt</a> for license information.<br class="">+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+//<br class="">+// This file enumerates the various bitfields that we want to store on C++ class<br class="">+// definitions.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+//<br class="">+/// @file CXXRecordDeclDefinitionBits.def<br class="">+///<br class="">+/// In this file, each of the bitfields representing data about a C++ class<br class="">+/// results in an expansion of the FIELD macro, which should be defined before<br class="">+/// including this file.<br class="">+///<br class="">+/// The macro have three operands:<br class="">+///<br class="">+/// Name: The name of the field, as a member of CXXRecordDecl::DefinitionData.<br class="">+///<br class="">+/// BitWidth: The width of the field in bits.<br class="">+///<br class="">+/// MergePolicy: How to behave when the value of the field is different in<br class="">+/// multiple translation units, one of:<br class="">+/// NO_MERGE: It is an ODR violation if the fields do not match.<br class="">+/// MERGE_OR: Merge the fields by ORing them together.<br class="">+<br class="">+#ifndef FIELD<br class="">+#error define FIELD before including this file<br class="">+#endif<br class="">+<br class="">+/// True if this class has any user-declared constructors.<br class="">+FIELD(UserDeclaredConstructor, 1, NO_MERGE)<br class="">+<br class="">+/// The user-declared special members which this class has.<br class="">+FIELD(UserDeclaredSpecialMembers, 6, NO_MERGE)<br class="">+<br class="">+/// True when this class is an aggregate.<br class="">+FIELD(Aggregate, 1, NO_MERGE)<br class="">+<br class="">+/// True when this class is a POD-type.<br class="">+FIELD(PlainOldData, 1, NO_MERGE)<br class="">+<br class="">+/// True when this class is empty for traits purposes, that is:<br class="">+/// * has no data members other than 0-width bit-fields and empty fields<br class="">+/// marked [[no_unique_address]]<br class="">+/// * has no virtual function/base, and<br class="">+/// * doesn't inherit from a non-empty class.<br class="">+/// Doesn't take union-ness into account.<br class="">+FIELD(Empty, 1, NO_MERGE)<br class="">+<br class="">+/// True when this class is polymorphic, i.e., has at<br class="">+/// least one virtual member or derives from a polymorphic class.<br class="">+FIELD(Polymorphic, 1, NO_MERGE)<br class="">+<br class="">+/// True when this class is abstract, i.e., has at least<br class="">+/// one pure virtual function, (that can come from a base class).<br class="">+FIELD(Abstract, 1, NO_MERGE)<br class="">+<br class="">+/// True when this class is standard-layout, per the applicable<br class="">+/// language rules (including DRs).<br class="">+FIELD(IsStandardLayout, 1, NO_MERGE)<br class="">+<br class="">+/// True when this class was standard-layout under the C++11<br class="">+/// definition.<br class="">+///<br class="">+/// C++11 [class]p7. A standard-layout class is a class that:<br class="">+/// * has no non-static data members of type non-standard-layout class (or<br class="">+/// array of such types) or reference,<br class="">+/// * has no virtual functions (10.3) and no virtual base classes (10.1),<br class="">+/// * has the same access control (Clause 11) for all non-static data<br class="">+/// members<br class="">+/// * has no non-standard-layout base classes,<br class="">+/// * either has no non-static data members in the most derived class and at<br class="">+/// most one base class with non-static data members, or has no base<br class="">+/// classes with non-static data members, and<br class="">+/// * has no base classes of the same type as the first non-static data<br class="">+/// member.<br class="">+FIELD(IsCXX11StandardLayout, 1, NO_MERGE)<br class="">+<br class="">+/// True when any base class has any declared non-static data<br class="">+/// members or bit-fields.<br class="">+/// This is a helper bit of state used to implement IsStandardLayout more<br class="">+/// efficiently.<br class="">+FIELD(HasBasesWithFields, 1, NO_MERGE)<br class="">+<br class="">+/// True when any base class has any declared non-static data<br class="">+/// members.<br class="">+/// This is a helper bit of state used to implement IsCXX11StandardLayout<br class="">+/// more efficiently.<br class="">+FIELD(HasBasesWithNonStaticDataMembers, 1, NO_MERGE)<br class="">+<br class="">+/// True when there are private non-static data members.<br class="">+FIELD(HasPrivateFields, 1, NO_MERGE)<br class="">+<br class="">+/// True when there are protected non-static data members.<br class="">+FIELD(HasProtectedFields, 1, NO_MERGE)<br class="">+<br class="">+/// True when there are private non-static data members.<br class="">+FIELD(HasPublicFields, 1, NO_MERGE)<br class="">+<br class="">+/// True if this class (or any subobject) has mutable fields.<br class="">+FIELD(HasMutableFields, 1, NO_MERGE)<br class="">+<br class="">+/// True if this class (or any nested anonymous struct or union)<br class="">+/// has variant members.<br class="">+FIELD(HasVariantMembers, 1, NO_MERGE)<br class="">+<br class="">+/// True if there no non-field members declared by the user.<br class="">+FIELD(HasOnlyCMembers, 1, NO_MERGE)<br class="">+<br class="">+/// True if any field has an in-class initializer, including those<br class="">+/// within anonymous unions or structs.<br class="">+FIELD(HasInClassInitializer, 1, NO_MERGE)<br class="">+<br class="">+/// True if any field is of reference type, and does not have an<br class="">+/// in-class initializer.<br class="">+///<br class="">+/// In this case, value-initialization of this class is illegal in C++98<br class="">+/// even if the class has a trivial default constructor.<br class="">+FIELD(HasUninitializedReferenceMember, 1, NO_MERGE)<br class="">+<br class="">+/// True if any non-mutable field whose type doesn't have a user-<br class="">+/// provided default ctor also doesn't have an in-class initializer.<br class="">+FIELD(HasUninitializedFields, 1, NO_MERGE)<br class="">+<br class="">+/// True if there are any member using-declarations that inherit<br class="">+/// constructors from a base class.<br class="">+FIELD(HasInheritedConstructor, 1, NO_MERGE)<br class="">+<br class="">+/// True if there are any member using-declarations named<br class="">+/// 'operator='.<br class="">+FIELD(HasInheritedAssignment, 1, NO_MERGE)<br class="">+<br class="">+/// These flags are \c true if a defaulted corresponding special<br class="">+/// member can't be fully analyzed without performing overload resolution.<br class="">+/// @{<br class="">+FIELD(NeedOverloadResolutionForCopyConstructor, 1, NO_MERGE)<br class="">+FIELD(NeedOverloadResolutionForMoveConstructor, 1, NO_MERGE)<br class="">+FIELD(NeedOverloadResolutionForMoveAssignment, 1, NO_MERGE)<br class="">+FIELD(NeedOverloadResolutionForDestructor, 1, NO_MERGE)<br class="">+/// @}<br class="">+<br class="">+/// These flags are \c true if an implicit defaulted corresponding<br class="">+/// special member would be defined as deleted.<br class="">+/// @{<br class="">+FIELD(DefaultedCopyConstructorIsDeleted, 1, NO_MERGE)<br class="">+FIELD(DefaultedMoveConstructorIsDeleted, 1, NO_MERGE)<br class="">+FIELD(DefaultedMoveAssignmentIsDeleted, 1, NO_MERGE)<br class="">+FIELD(DefaultedDestructorIsDeleted, 1, NO_MERGE)<br class="">+/// @}<br class="">+<br class="">+/// The trivial special members which this class has, per<br class="">+/// C++11 [class.ctor]p5, C++11 [class.copy]p12, C++11 [class.copy]p25,<br class="">+/// C++11 [class.dtor]p5, or would have if the member were not suppressed.<br class="">+///<br class="">+/// This excludes any user-declared but not user-provided special members<br class="">+/// which have been declared but not yet defined.<br class="">+FIELD(HasTrivialSpecialMembers, 6, MERGE_OR)<br class="">+<br class="">+/// These bits keep track of the triviality of special functions for the<br class="">+/// purpose of calls. Only the bits corresponding to SMF_CopyConstructor,<br class="">+/// SMF_MoveConstructor, and SMF_Destructor are meaningful here.<br class="">+FIELD(HasTrivialSpecialMembersForCall, 6, MERGE_OR)<br class="">+<br class="">+/// The declared special members of this class which are known to be<br class="">+/// non-trivial.<br class="">+///<br class="">+/// This excludes any user-declared but not user-provided special members<br class="">+/// which have been declared but not yet defined, and any implicit special<br class="">+/// members which have not yet been declared.<br class="">+FIELD(DeclaredNonTrivialSpecialMembers, 6, MERGE_OR)<br class="">+<br class="">+/// These bits keep track of the declared special members that are<br class="">+/// non-trivial for the purpose of calls.<br class="">+/// Only the bits corresponding to SMF_CopyConstructor,<br class="">+/// SMF_MoveConstructor, and SMF_Destructor are meaningful here.<br class="">+FIELD(DeclaredNonTrivialSpecialMembersForCall, 6, MERGE_OR)<br class="">+<br class="">+/// True when this class has a destructor with no semantic effect.<br class="">+FIELD(HasIrrelevantDestructor, 1, NO_MERGE)<br class="">+<br class="">+/// True when this class has at least one user-declared constexpr<br class="">+/// constructor which is neither the copy nor move constructor.<br class="">+FIELD(HasConstexprNonCopyMoveConstructor, 1, MERGE_OR)<br class="">+<br class="">+/// True if this class has a (possibly implicit) defaulted default<br class="">+/// constructor.<br class="">+FIELD(HasDefaultedDefaultConstructor, 1, MERGE_OR)<br class="">+<br class="">+/// True if a defaulted default constructor for this class would<br class="">+/// be constexpr.<br class="">+FIELD(DefaultedDefaultConstructorIsConstexpr, 1, NO_MERGE)<br class="">+<br class="">+/// True if this class has a constexpr default constructor.<br class="">+///<br class="">+/// This is true for either a user-declared constexpr default constructor<br class="">+/// or an implicitly declared constexpr default constructor.<br class="">+FIELD(HasConstexprDefaultConstructor, 1, MERGE_OR)<br class="">+<br class="">+/// True if a defaulted destructor for this class would be constexpr.<br class="">+FIELD(DefaultedDestructorIsConstexpr, 1, NO_MERGE)<br class="">+<br class="">+/// True when this class contains at least one non-static data<br class="">+/// member or base class of non-literal or volatile type.<br class="">+FIELD(HasNonLiteralTypeFieldsOrBases, 1, NO_MERGE)<br class="">+<br class="">+/// Whether we have a C++11 user-provided default constructor (not<br class="">+/// explicitly deleted or defaulted).<br class="">+FIELD(UserProvidedDefaultConstructor, 1, NO_MERGE)<br class="">+<br class="">+/// The special members which have been declared for this class,<br class="">+/// either by the user or implicitly.<br class="">+FIELD(DeclaredSpecialMembers, 6, MERGE_OR)<br class="">+<br class="">+/// Whether an implicit copy constructor could have a const-qualified<br class="">+/// parameter, for initializing virtual bases and for other subobjects.<br class="">+FIELD(ImplicitCopyConstructorCanHaveConstParamForVBase, 1, NO_MERGE)<br class="">+FIELD(ImplicitCopyConstructorCanHaveConstParamForNonVBase, 1, NO_MERGE)<br class="">+<br class="">+/// Whether an implicit copy assignment operator would have a<br class="">+/// const-qualified parameter.<br class="">+FIELD(ImplicitCopyAssignmentHasConstParam, 1, NO_MERGE)<br class="">+<br class="">+/// Whether any declared copy constructor has a const-qualified<br class="">+/// parameter.<br class="">+FIELD(HasDeclaredCopyConstructorWithConstParam, 1, MERGE_OR)<br class="">+<br class="">+/// Whether any declared copy assignment operator has either a<br class="">+/// const-qualified reference parameter or a non-reference parameter.<br class="">+FIELD(HasDeclaredCopyAssignmentWithConstParam, 1, MERGE_OR)<br class="">+<br class="">+#undef FIELD<br class=""><br class="">Modified: cfe/trunk/include/clang/AST/DeclCXX.h<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=374484&r1=374483&r2=374484&view=diff" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=374484&r1=374483&r2=374484&view=diff</a><br class="">==============================================================================<br class="">--- cfe/trunk/include/clang/AST/DeclCXX.h (original)<br class="">+++ cfe/trunk/include/clang/AST/DeclCXX.h Thu Oct 10 17:29:04 2019<br class="">@@ -277,210 +277,9 @@ class CXXRecordDecl : public RecordDecl<br class=""> };<br class=""><br class=""> struct DefinitionData {<br class="">- /// True if this class has any user-declared constructors.<br class="">- unsigned UserDeclaredConstructor : 1;<br class="">-<br class="">- /// The user-declared special members which this class has.<br class="">- unsigned UserDeclaredSpecialMembers : 6;<br class="">-<br class="">- /// True when this class is an aggregate.<br class="">- unsigned Aggregate : 1;<br class="">-<br class="">- /// True when this class is a POD-type.<br class="">- unsigned PlainOldData : 1;<br class="">-<br class="">- /// True when this class is empty for traits purposes, that is:<br class="">- /// * has no data members other than 0-width bit-fields and empty fields<br class="">- /// marked [[no_unique_address]]<br class="">- /// * has no virtual function/base, and<br class="">- /// * doesn't inherit from a non-empty class.<br class="">- /// Doesn't take union-ness into account.<br class="">- unsigned Empty : 1;<br class="">-<br class="">- /// True when this class is polymorphic, i.e., has at<br class="">- /// least one virtual member or derives from a polymorphic class.<br class="">- unsigned Polymorphic : 1;<br class="">-<br class="">- /// True when this class is abstract, i.e., has at least<br class="">- /// one pure virtual function, (that can come from a base class).<br class="">- unsigned Abstract : 1;<br class="">-<br class="">- /// True when this class is standard-layout, per the applicable<br class="">- /// language rules (including DRs).<br class="">- unsigned IsStandardLayout : 1;<br class="">-<br class="">- /// True when this class was standard-layout under the C++11<br class="">- /// definition.<br class="">- ///<br class="">- /// C++11 [class]p7. A standard-layout class is a class that:<br class="">- /// * has no non-static data members of type non-standard-layout class (or<br class="">- /// array of such types) or reference,<br class="">- /// * has no virtual functions (10.3) and no virtual base classes (10.1),<br class="">- /// * has the same access control (Clause 11) for all non-static data<br class="">- /// members<br class="">- /// * has no non-standard-layout base classes,<br class="">- /// * either has no non-static data members in the most derived class and at<br class="">- /// most one base class with non-static data members, or has no base<br class="">- /// classes with non-static data members, and<br class="">- /// * has no base classes of the same type as the first non-static data<br class="">- /// member.<br class="">- unsigned IsCXX11StandardLayout : 1;<br class="">-<br class="">- /// True when any base class has any declared non-static data<br class="">- /// members or bit-fields.<br class="">- /// This is a helper bit of state used to implement IsStandardLayout more<br class="">- /// efficiently.<br class="">- unsigned HasBasesWithFields : 1;<br class="">-<br class="">- /// True when any base class has any declared non-static data<br class="">- /// members.<br class="">- /// This is a helper bit of state used to implement IsCXX11StandardLayout<br class="">- /// more efficiently.<br class="">- unsigned HasBasesWithNonStaticDataMembers : 1;<br class="">-<br class="">- /// True when there are private non-static data members.<br class="">- unsigned HasPrivateFields : 1;<br class="">-<br class="">- /// True when there are protected non-static data members.<br class="">- unsigned HasProtectedFields : 1;<br class="">-<br class="">- /// True when there are private non-static data members.<br class="">- unsigned HasPublicFields : 1;<br class="">-<br class="">- /// True if this class (or any subobject) has mutable fields.<br class="">- unsigned HasMutableFields : 1;<br class="">-<br class="">- /// True if this class (or any nested anonymous struct or union)<br class="">- /// has variant members.<br class="">- unsigned HasVariantMembers : 1;<br class="">-<br class="">- /// True if there no non-field members declared by the user.<br class="">- unsigned HasOnlyCMembers : 1;<br class="">-<br class="">- /// True if any field has an in-class initializer, including those<br class="">- /// within anonymous unions or structs.<br class="">- unsigned HasInClassInitializer : 1;<br class="">-<br class="">- /// True if any field is of reference type, and does not have an<br class="">- /// in-class initializer.<br class="">- ///<br class="">- /// In this case, value-initialization of this class is illegal in C++98<br class="">- /// even if the class has a trivial default constructor.<br class="">- unsigned HasUninitializedReferenceMember : 1;<br class="">-<br class="">- /// True if any non-mutable field whose type doesn't have a user-<br class="">- /// provided default ctor also doesn't have an in-class initializer.<br class="">- unsigned HasUninitializedFields : 1;<br class="">-<br class="">- /// True if there are any member using-declarations that inherit<br class="">- /// constructors from a base class.<br class="">- unsigned HasInheritedConstructor : 1;<br class="">-<br class="">- /// True if there are any member using-declarations named<br class="">- /// 'operator='.<br class="">- unsigned HasInheritedAssignment : 1;<br class="">-<br class="">- /// These flags are \c true if a defaulted corresponding special<br class="">- /// member can't be fully analyzed without performing overload resolution.<br class="">- /// @{<br class="">- unsigned NeedOverloadResolutionForCopyConstructor : 1;<br class="">- unsigned NeedOverloadResolutionForMoveConstructor : 1;<br class="">- unsigned NeedOverloadResolutionForMoveAssignment : 1;<br class="">- unsigned NeedOverloadResolutionForDestructor : 1;<br class="">- /// @}<br class="">-<br class="">- /// These flags are \c true if an implicit defaulted corresponding<br class="">- /// special member would be defined as deleted.<br class="">- /// @{<br class="">- unsigned DefaultedCopyConstructorIsDeleted : 1;<br class="">- unsigned DefaultedMoveConstructorIsDeleted : 1;<br class="">- unsigned DefaultedMoveAssignmentIsDeleted : 1;<br class="">- unsigned DefaultedDestructorIsDeleted : 1;<br class="">- /// @}<br class="">-<br class="">- /// The trivial special members which this class has, per<br class="">- /// C++11 [class.ctor]p5, C++11 [class.copy]p12, C++11 [class.copy]p25,<br class="">- /// C++11 [class.dtor]p5, or would have if the member were not suppressed.<br class="">- ///<br class="">- /// This excludes any user-declared but not user-provided special members<br class="">- /// which have been declared but not yet defined.<br class="">- unsigned HasTrivialSpecialMembers : 6;<br class="">-<br class="">- /// These bits keep track of the triviality of special functions for the<br class="">- /// purpose of calls. Only the bits corresponding to SMF_CopyConstructor,<br class="">- /// SMF_MoveConstructor, and SMF_Destructor are meaningful here.<br class="">- unsigned HasTrivialSpecialMembersForCall : 6;<br class="">-<br class="">- /// The declared special members of this class which are known to be<br class="">- /// non-trivial.<br class="">- ///<br class="">- /// This excludes any user-declared but not user-provided special members<br class="">- /// which have been declared but not yet defined, and any implicit special<br class="">- /// members which have not yet been declared.<br class="">- unsigned DeclaredNonTrivialSpecialMembers : 6;<br class="">-<br class="">- /// These bits keep track of the declared special members that are<br class="">- /// non-trivial for the purpose of calls.<br class="">- /// Only the bits corresponding to SMF_CopyConstructor,<br class="">- /// SMF_MoveConstructor, and SMF_Destructor are meaningful here.<br class="">- unsigned DeclaredNonTrivialSpecialMembersForCall : 6;<br class="">-<br class="">- /// True when this class has a destructor with no semantic effect.<br class="">- unsigned HasIrrelevantDestructor : 1;<br class="">-<br class="">- /// True when this class has at least one user-declared constexpr<br class="">- /// constructor which is neither the copy nor move constructor.<br class="">- unsigned HasConstexprNonCopyMoveConstructor : 1;<br class="">-<br class="">- /// True if this class has a (possibly implicit) defaulted default<br class="">- /// constructor.<br class="">- unsigned HasDefaultedDefaultConstructor : 1;<br class="">-<br class="">- /// True if a defaulted default constructor for this class would<br class="">- /// be constexpr.<br class="">- unsigned DefaultedDefaultConstructorIsConstexpr : 1;<br class="">-<br class="">- /// True if this class has a constexpr default constructor.<br class="">- ///<br class="">- /// This is true for either a user-declared constexpr default constructor<br class="">- /// or an implicitly declared constexpr default constructor.<br class="">- unsigned HasConstexprDefaultConstructor : 1;<br class="">-<br class="">- /// True if a defaulted destructor for this class would be constexpr.<br class="">- unsigned DefaultedDestructorIsConstexpr : 1;<br class="">-<br class="">- /// True when this class contains at least one non-static data<br class="">- /// member or base class of non-literal or volatile type.<br class="">- unsigned HasNonLiteralTypeFieldsOrBases : 1;<br class="">-<br class="">- /// True when visible conversion functions are already computed<br class="">- /// and are available.<br class="">- unsigned ComputedVisibleConversions : 1;<br class="">-<br class="">- /// Whether we have a C++11 user-provided default constructor (not<br class="">- /// explicitly deleted or defaulted).<br class="">- unsigned UserProvidedDefaultConstructor : 1;<br class="">-<br class="">- /// The special members which have been declared for this class,<br class="">- /// either by the user or implicitly.<br class="">- unsigned DeclaredSpecialMembers : 6;<br class="">-<br class="">- /// Whether an implicit copy constructor could have a const-qualified<br class="">- /// parameter, for initializing virtual bases and for other subobjects.<br class="">- unsigned ImplicitCopyConstructorCanHaveConstParamForVBase : 1;<br class="">- unsigned ImplicitCopyConstructorCanHaveConstParamForNonVBase : 1;<br class="">-<br class="">- /// Whether an implicit copy assignment operator would have a<br class="">- /// const-qualified parameter.<br class="">- unsigned ImplicitCopyAssignmentHasConstParam : 1;<br class="">-<br class="">- /// Whether any declared copy constructor has a const-qualified<br class="">- /// parameter.<br class="">- unsigned HasDeclaredCopyConstructorWithConstParam : 1;<br class="">-<br class="">- /// Whether any declared copy assignment operator has either a<br class="">- /// const-qualified reference parameter or a non-reference parameter.<br class="">- unsigned HasDeclaredCopyAssignmentWithConstParam : 1;<br class="">+ #define FIELD(Name, Width, Merge) \<br class="">+ unsigned Name : Width;<br class="">+ #include "CXXRecordDeclDefinitionBits.def"<br class=""><br class=""> /// Whether this class describes a C++ lambda.<br class=""> unsigned IsLambda : 1;<br class="">@@ -488,6 +287,10 @@ class CXXRecordDecl : public RecordDecl<br class=""> /// Whether we are currently parsing base specifiers.<br class=""> unsigned IsParsingBaseSpecifiers : 1;<br class=""><br class="">+ /// True when visible conversion functions are already computed<br class="">+ /// and are available.<br class="">+ unsigned ComputedVisibleConversions : 1;<br class="">+<br class=""> unsigned HasODRHash : 1;<br class=""><br class=""> /// A hash of parts of the class to help in ODR checking.<br class=""><br class="">Modified: cfe/trunk/lib/AST/ASTImporter.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTImporter.cpp?rev=374484&r1=374483&r2=374484&view=diff" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTImporter.cpp?rev=374484&r1=374483&r2=374484&view=diff</a><br class="">==============================================================================<br class="">--- cfe/trunk/lib/AST/ASTImporter.cpp (original)<br class="">+++ cfe/trunk/lib/AST/ASTImporter.cpp Thu Oct 10 17:29:04 2019<br class="">@@ -1836,71 +1836,10 @@ Error ASTNodeImporter::ImportDefinition(<br class=""><br class=""> struct CXXRecordDecl::DefinitionData &ToData = ToCXX->data();<br class=""> struct CXXRecordDecl::DefinitionData &FromData = FromCXX->data();<br class="">- ToData.UserDeclaredConstructor = FromData.UserDeclaredConstructor;<br class="">- ToData.UserDeclaredSpecialMembers = FromData.UserDeclaredSpecialMembers;<br class="">- ToData.Aggregate = FromData.Aggregate;<br class="">- ToData.PlainOldData = FromData.PlainOldData;<br class="">- ToData.Empty = FromData.Empty;<br class="">- ToData.Polymorphic = FromData.Polymorphic;<br class="">- ToData.Abstract = FromData.Abstract;<br class="">- ToData.IsStandardLayout = FromData.IsStandardLayout;<br class="">- ToData.IsCXX11StandardLayout = FromData.IsCXX11StandardLayout;<br class="">- ToData.HasBasesWithFields = FromData.HasBasesWithFields;<br class="">- ToData.HasBasesWithNonStaticDataMembers =<br class="">- FromData.HasBasesWithNonStaticDataMembers;<br class="">- ToData.HasPrivateFields = FromData.HasPrivateFields;<br class="">- ToData.HasProtectedFields = FromData.HasProtectedFields;<br class="">- ToData.HasPublicFields = FromData.HasPublicFields;<br class="">- ToData.HasMutableFields = FromData.HasMutableFields;<br class="">- ToData.HasVariantMembers = FromData.HasVariantMembers;<br class="">- ToData.HasOnlyCMembers = FromData.HasOnlyCMembers;<br class="">- ToData.HasInClassInitializer = FromData.HasInClassInitializer;<br class="">- ToData.HasUninitializedReferenceMember<br class="">- = FromData.HasUninitializedReferenceMember;<br class="">- ToData.HasUninitializedFields = FromData.HasUninitializedFields;<br class="">- ToData.HasInheritedConstructor = FromData.HasInheritedConstructor;<br class="">- ToData.HasInheritedAssignment = FromData.HasInheritedAssignment;<br class="">- ToData.NeedOverloadResolutionForCopyConstructor<br class="">- = FromData.NeedOverloadResolutionForCopyConstructor;<br class="">- ToData.NeedOverloadResolutionForMoveConstructor<br class="">- = FromData.NeedOverloadResolutionForMoveConstructor;<br class="">- ToData.NeedOverloadResolutionForMoveAssignment<br class="">- = FromData.NeedOverloadResolutionForMoveAssignment;<br class="">- ToData.NeedOverloadResolutionForDestructor<br class="">- = FromData.NeedOverloadResolutionForDestructor;<br class="">- ToData.DefaultedCopyConstructorIsDeleted<br class="">- = FromData.DefaultedCopyConstructorIsDeleted;<br class="">- ToData.DefaultedMoveConstructorIsDeleted<br class="">- = FromData.DefaultedMoveConstructorIsDeleted;<br class="">- ToData.DefaultedMoveAssignmentIsDeleted<br class="">- = FromData.DefaultedMoveAssignmentIsDeleted;<br class="">- ToData.DefaultedDestructorIsDeleted = FromData.DefaultedDestructorIsDeleted;<br class="">- ToData.HasTrivialSpecialMembers = FromData.HasTrivialSpecialMembers;<br class="">- ToData.HasIrrelevantDestructor = FromData.HasIrrelevantDestructor;<br class="">- ToData.HasConstexprNonCopyMoveConstructor<br class="">- = FromData.HasConstexprNonCopyMoveConstructor;<br class="">- ToData.HasDefaultedDefaultConstructor<br class="">- = FromData.HasDefaultedDefaultConstructor;<br class="">- ToData.DefaultedDefaultConstructorIsConstexpr<br class="">- = FromData.DefaultedDefaultConstructorIsConstexpr;<br class="">- ToData.HasConstexprDefaultConstructor<br class="">- = FromData.HasConstexprDefaultConstructor;<br class="">- ToData.HasNonLiteralTypeFieldsOrBases<br class="">- = FromData.HasNonLiteralTypeFieldsOrBases;<br class="">- // ComputedVisibleConversions not imported.<br class="">- ToData.UserProvidedDefaultConstructor<br class="">- = FromData.UserProvidedDefaultConstructor;<br class="">- ToData.DeclaredSpecialMembers = FromData.DeclaredSpecialMembers;<br class="">- ToData.ImplicitCopyConstructorCanHaveConstParamForVBase<br class="">- = FromData.ImplicitCopyConstructorCanHaveConstParamForVBase;<br class="">- ToData.ImplicitCopyConstructorCanHaveConstParamForNonVBase<br class="">- = FromData.ImplicitCopyConstructorCanHaveConstParamForNonVBase;<br class="">- ToData.ImplicitCopyAssignmentHasConstParam<br class="">- = FromData.ImplicitCopyAssignmentHasConstParam;<br class="">- ToData.HasDeclaredCopyConstructorWithConstParam<br class="">- = FromData.HasDeclaredCopyConstructorWithConstParam;<br class="">- ToData.HasDeclaredCopyAssignmentWithConstParam<br class="">- = FromData.HasDeclaredCopyAssignmentWithConstParam;<br class="">+<br class="">+ #define FIELD(Name, Width, Merge) \<br class="">+ ToData.Name = FromData.Name;<br class="">+ #include "clang/AST/CXXRecordDeclDefinitionBits.def"<br class=""><br class=""> // Copy over the data stored in RecordDeclBits<br class=""> ToCXX->setArgPassingRestrictions(FromCXX->getArgPassingRestrictions());<br class=""><br class="">Modified: cfe/trunk/lib/AST/DeclCXX.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=374484&r1=374483&r2=374484&view=diff" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=374484&r1=374483&r2=374484&view=diff</a><br class="">==============================================================================<br class="">--- cfe/trunk/lib/AST/DeclCXX.cpp (original)<br class="">+++ cfe/trunk/lib/AST/DeclCXX.cpp Thu Oct 10 17:29:04 2019<br class="">@@ -96,14 +96,15 @@ CXXRecordDecl::DefinitionData::Definitio<br class=""> DefaultedDefaultConstructorIsConstexpr(true),<br class=""> HasConstexprDefaultConstructor(false),<br class=""> DefaultedDestructorIsConstexpr(true),<br class="">- HasNonLiteralTypeFieldsOrBases(false), ComputedVisibleConversions(false),<br class="">+ HasNonLiteralTypeFieldsOrBases(false),<br class=""> UserProvidedDefaultConstructor(false), DeclaredSpecialMembers(0),<br class=""> ImplicitCopyConstructorCanHaveConstParamForVBase(true),<br class=""> ImplicitCopyConstructorCanHaveConstParamForNonVBase(true),<br class=""> ImplicitCopyAssignmentHasConstParam(true),<br class=""> HasDeclaredCopyConstructorWithConstParam(false),<br class=""> HasDeclaredCopyAssignmentWithConstParam(false), IsLambda(false),<br class="">- IsParsingBaseSpecifiers(false), HasODRHash(false), Definition(D) {}<br class="">+ IsParsingBaseSpecifiers(false), ComputedVisibleConversions(false),<br class="">+ HasODRHash(false), Definition(D) {}<br class=""><br class=""> CXXBaseSpecifier *CXXRecordDecl::DefinitionData::getBasesSlowCase() const {<br class=""> return Bases.get(Definition->getASTContext().getExternalSource());<br class=""><br class="">Modified: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderDecl.cpp?rev=374484&r1=374483&r2=374484&view=diff" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderDecl.cpp?rev=374484&r1=374483&r2=374484&view=diff</a><br class="">==============================================================================<br class="">--- cfe/trunk/lib/Serialization/ASTReaderDecl.cpp (original)<br class="">+++ cfe/trunk/lib/Serialization/ASTReaderDecl.cpp Thu Oct 10 17:29:04 2019<br class="">@@ -1656,55 +1656,11 @@ void ASTDeclReader::VisitUnresolvedUsing<br class=""><br class=""> void ASTDeclReader::ReadCXXDefinitionData(<br class=""> struct CXXRecordDecl::DefinitionData &Data, const CXXRecordDecl *D) {<br class="">+ #define FIELD(Name, Width, Merge) \<br class="">+ Data.Name = Record.readInt();<br class="">+ #include "clang/AST/CXXRecordDeclDefinitionBits.def"<br class="">+<br class=""> // Note: the caller has deserialized the IsLambda bit already.<br class="">- Data.UserDeclaredConstructor = Record.readInt();<br class="">- Data.UserDeclaredSpecialMembers = Record.readInt();<br class="">- Data.Aggregate = Record.readInt();<br class="">- Data.PlainOldData = Record.readInt();<br class="">- Data.Empty = Record.readInt();<br class="">- Data.Polymorphic = Record.readInt();<br class="">- Data.Abstract = Record.readInt();<br class="">- Data.IsStandardLayout = Record.readInt();<br class="">- Data.IsCXX11StandardLayout = Record.readInt();<br class="">- Data.HasBasesWithFields = Record.readInt();<br class="">- Data.HasBasesWithNonStaticDataMembers = Record.readInt();<br class="">- Data.HasPrivateFields = Record.readInt();<br class="">- Data.HasProtectedFields = Record.readInt();<br class="">- Data.HasPublicFields = Record.readInt();<br class="">- Data.HasMutableFields = Record.readInt();<br class="">- Data.HasVariantMembers = Record.readInt();<br class="">- Data.HasOnlyCMembers = Record.readInt();<br class="">- Data.HasInClassInitializer = Record.readInt();<br class="">- Data.HasUninitializedReferenceMember = Record.readInt();<br class="">- Data.HasUninitializedFields = Record.readInt();<br class="">- Data.HasInheritedConstructor = Record.readInt();<br class="">- Data.HasInheritedAssignment = Record.readInt();<br class="">- Data.NeedOverloadResolutionForCopyConstructor = Record.readInt();<br class="">- Data.NeedOverloadResolutionForMoveConstructor = Record.readInt();<br class="">- Data.NeedOverloadResolutionForMoveAssignment = Record.readInt();<br class="">- Data.NeedOverloadResolutionForDestructor = Record.readInt();<br class="">- Data.DefaultedCopyConstructorIsDeleted = Record.readInt();<br class="">- Data.DefaultedMoveConstructorIsDeleted = Record.readInt();<br class="">- Data.DefaultedMoveAssignmentIsDeleted = Record.readInt();<br class="">- Data.DefaultedDestructorIsDeleted = Record.readInt();<br class="">- Data.HasTrivialSpecialMembers = Record.readInt();<br class="">- Data.HasTrivialSpecialMembersForCall = Record.readInt();<br class="">- Data.DeclaredNonTrivialSpecialMembers = Record.readInt();<br class="">- Data.DeclaredNonTrivialSpecialMembersForCall = Record.readInt();<br class="">- Data.HasIrrelevantDestructor = Record.readInt();<br class="">- Data.HasConstexprNonCopyMoveConstructor = Record.readInt();<br class="">- Data.HasDefaultedDefaultConstructor = Record.readInt();<br class="">- Data.DefaultedDefaultConstructorIsConstexpr = Record.readInt();<br class="">- Data.HasConstexprDefaultConstructor = Record.readInt();<br class="">- Data.HasNonLiteralTypeFieldsOrBases = Record.readInt();<br class="">- Data.ComputedVisibleConversions = Record.readInt();<br class="">- Data.UserProvidedDefaultConstructor = Record.readInt();<br class="">- Data.DeclaredSpecialMembers = Record.readInt();<br class="">- Data.ImplicitCopyConstructorCanHaveConstParamForVBase = Record.readInt();<br class="">- Data.ImplicitCopyConstructorCanHaveConstParamForNonVBase = Record.readInt();<br class="">- Data.ImplicitCopyAssignmentHasConstParam = Record.readInt();<br class="">- Data.HasDeclaredCopyConstructorWithConstParam = Record.readInt();<br class="">- Data.HasDeclaredCopyAssignmentWithConstParam = Record.readInt();<br class=""> Data.ODRHash = Record.readInt();<br class=""> Data.HasODRHash = true;<br class=""><br class="">@@ -1719,7 +1675,9 @@ void ASTDeclReader::ReadCXXDefinitionDat<br class=""> Data.VBases = ReadGlobalOffset();<br class=""><br class=""> Record.readUnresolvedSet(Data.Conversions);<br class="">- Record.readUnresolvedSet(Data.VisibleConversions);<br class="">+ Data.ComputedVisibleConversions = Record.readInt();<br class="">+ if (Data.ComputedVisibleConversions)<br class="">+ Record.readUnresolvedSet(Data.VisibleConversions);<br class=""> assert(Data.Definition && "Data.Definition should be already set!");<br class=""> Data.FirstFriend = ReadDeclID();<br class=""><br class="">@@ -1792,63 +1750,17 @@ void ASTDeclReader::MergeDefinitionData(<br class=""> return;<br class=""> }<br class=""><br class="">- // FIXME: Move this out into a .def file?<br class=""> bool DetectedOdrViolation = false;<br class="">-#define OR_FIELD(Field) DD.Field |= MergeDD.Field;<br class="">-#define MATCH_FIELD(Field) \<br class="">+<br class="">+ #define FIELD(Name, Width, Merge) Merge(Name)<br class="">+ #define MERGE_OR(Field) DD.Field |= MergeDD.Field;<br class="">+ #define NO_MERGE(Field) \<br class=""> DetectedOdrViolation |= DD.Field != MergeDD.Field; \<br class="">- OR_FIELD(Field)<br class="">- MATCH_FIELD(UserDeclaredConstructor)<br class="">- MATCH_FIELD(UserDeclaredSpecialMembers)<br class="">- MATCH_FIELD(Aggregate)<br class="">- MATCH_FIELD(PlainOldData)<br class="">- MATCH_FIELD(Empty)<br class="">- MATCH_FIELD(Polymorphic)<br class="">- MATCH_FIELD(Abstract)<br class="">- MATCH_FIELD(IsStandardLayout)<br class="">- MATCH_FIELD(IsCXX11StandardLayout)<br class="">- MATCH_FIELD(HasBasesWithFields)<br class="">- MATCH_FIELD(HasBasesWithNonStaticDataMembers)<br class="">- MATCH_FIELD(HasPrivateFields)<br class="">- MATCH_FIELD(HasProtectedFields)<br class="">- MATCH_FIELD(HasPublicFields)<br class="">- MATCH_FIELD(HasMutableFields)<br class="">- MATCH_FIELD(HasVariantMembers)<br class="">- MATCH_FIELD(HasOnlyCMembers)<br class="">- MATCH_FIELD(HasInClassInitializer)<br class="">- MATCH_FIELD(HasUninitializedReferenceMember)<br class="">- MATCH_FIELD(HasUninitializedFields)<br class="">- MATCH_FIELD(HasInheritedConstructor)<br class="">- MATCH_FIELD(HasInheritedAssignment)<br class="">- MATCH_FIELD(NeedOverloadResolutionForCopyConstructor)<br class="">- MATCH_FIELD(NeedOverloadResolutionForMoveConstructor)<br class="">- MATCH_FIELD(NeedOverloadResolutionForMoveAssignment)<br class="">- MATCH_FIELD(NeedOverloadResolutionForDestructor)<br class="">- MATCH_FIELD(DefaultedCopyConstructorIsDeleted)<br class="">- MATCH_FIELD(DefaultedMoveConstructorIsDeleted)<br class="">- MATCH_FIELD(DefaultedMoveAssignmentIsDeleted)<br class="">- MATCH_FIELD(DefaultedDestructorIsDeleted)<br class="">- OR_FIELD(HasTrivialSpecialMembers)<br class="">- OR_FIELD(HasTrivialSpecialMembersForCall)<br class="">- OR_FIELD(DeclaredNonTrivialSpecialMembers)<br class="">- OR_FIELD(DeclaredNonTrivialSpecialMembersForCall)<br class="">- MATCH_FIELD(HasIrrelevantDestructor)<br class="">- OR_FIELD(HasConstexprNonCopyMoveConstructor)<br class="">- OR_FIELD(HasDefaultedDefaultConstructor)<br class="">- MATCH_FIELD(DefaultedDefaultConstructorIsConstexpr)<br class="">- OR_FIELD(HasConstexprDefaultConstructor)<br class="">- MATCH_FIELD(HasNonLiteralTypeFieldsOrBases)<br class="">- // ComputedVisibleConversions is handled below.<br class="">- MATCH_FIELD(UserProvidedDefaultConstructor)<br class="">- OR_FIELD(DeclaredSpecialMembers)<br class="">- MATCH_FIELD(ImplicitCopyConstructorCanHaveConstParamForVBase)<br class="">- MATCH_FIELD(ImplicitCopyConstructorCanHaveConstParamForNonVBase)<br class="">- MATCH_FIELD(ImplicitCopyAssignmentHasConstParam)<br class="">- OR_FIELD(HasDeclaredCopyConstructorWithConstParam)<br class="">- OR_FIELD(HasDeclaredCopyAssignmentWithConstParam)<br class="">- MATCH_FIELD(IsLambda)<br class="">-#undef OR_FIELD<br class="">-#undef MATCH_FIELD<br class="">+ MERGE_OR(Field)<br class="">+ #include "clang/AST/CXXRecordDeclDefinitionBits.def"<br class="">+ NO_MERGE(IsLambda)<br class="">+ #undef NO_MERGE<br class="">+ #undef MERGE_OR<br class=""><br class=""> if (DD.NumBases != MergeDD.NumBases || DD.NumVBases != MergeDD.NumVBases)<br class=""> DetectedOdrViolation = true;<br class=""><br class="">Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=374484&r1=374483&r2=374484&view=diff" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=374484&r1=374483&r2=374484&view=diff</a><br class="">==============================================================================<br class="">--- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)<br class="">+++ cfe/trunk/lib/Serialization/ASTWriter.cpp Thu Oct 10 17:29:04 2019<br class="">@@ -6141,54 +6141,10 @@ void ASTRecordWriter::AddCXXCtorInitiali<br class=""> void ASTRecordWriter::AddCXXDefinitionData(const CXXRecordDecl *D) {<br class=""> auto &Data = D->data();<br class=""> Record->push_back(Data.IsLambda);<br class="">- Record->push_back(Data.UserDeclaredConstructor);<br class="">- Record->push_back(Data.UserDeclaredSpecialMembers);<br class="">- Record->push_back(Data.Aggregate);<br class="">- Record->push_back(Data.PlainOldData);<br class="">- Record->push_back(Data.Empty);<br class="">- Record->push_back(Data.Polymorphic);<br class="">- Record->push_back(Data.Abstract);<br class="">- Record->push_back(Data.IsStandardLayout);<br class="">- Record->push_back(Data.IsCXX11StandardLayout);<br class="">- Record->push_back(Data.HasBasesWithFields);<br class="">- Record->push_back(Data.HasBasesWithNonStaticDataMembers);<br class="">- Record->push_back(Data.HasPrivateFields);<br class="">- Record->push_back(Data.HasProtectedFields);<br class="">- Record->push_back(Data.HasPublicFields);<br class="">- Record->push_back(Data.HasMutableFields);<br class="">- Record->push_back(Data.HasVariantMembers);<br class="">- Record->push_back(Data.HasOnlyCMembers);<br class="">- Record->push_back(Data.HasInClassInitializer);<br class="">- Record->push_back(Data.HasUninitializedReferenceMember);<br class="">- Record->push_back(Data.HasUninitializedFields);<br class="">- Record->push_back(Data.HasInheritedConstructor);<br class="">- Record->push_back(Data.HasInheritedAssignment);<br class="">- Record->push_back(Data.NeedOverloadResolutionForCopyConstructor);<br class="">- Record->push_back(Data.NeedOverloadResolutionForMoveConstructor);<br class="">- Record->push_back(Data.NeedOverloadResolutionForMoveAssignment);<br class="">- Record->push_back(Data.NeedOverloadResolutionForDestructor);<br class="">- Record->push_back(Data.DefaultedCopyConstructorIsDeleted);<br class="">- Record->push_back(Data.DefaultedMoveConstructorIsDeleted);<br class="">- Record->push_back(Data.DefaultedMoveAssignmentIsDeleted);<br class="">- Record->push_back(Data.DefaultedDestructorIsDeleted);<br class="">- Record->push_back(Data.HasTrivialSpecialMembers);<br class="">- Record->push_back(Data.HasTrivialSpecialMembersForCall);<br class="">- Record->push_back(Data.DeclaredNonTrivialSpecialMembers);<br class="">- Record->push_back(Data.DeclaredNonTrivialSpecialMembersForCall);<br class="">- Record->push_back(Data.HasIrrelevantDestructor);<br class="">- Record->push_back(Data.HasConstexprNonCopyMoveConstructor);<br class="">- Record->push_back(Data.HasDefaultedDefaultConstructor);<br class="">- Record->push_back(Data.DefaultedDefaultConstructorIsConstexpr);<br class="">- Record->push_back(Data.HasConstexprDefaultConstructor);<br class="">- Record->push_back(Data.HasNonLiteralTypeFieldsOrBases);<br class="">- Record->push_back(Data.ComputedVisibleConversions);<br class="">- Record->push_back(Data.UserProvidedDefaultConstructor);<br class="">- Record->push_back(Data.DeclaredSpecialMembers);<br class="">- Record->push_back(Data.ImplicitCopyConstructorCanHaveConstParamForVBase);<br class="">- Record->push_back(Data.ImplicitCopyConstructorCanHaveConstParamForNonVBase);<br class="">- Record->push_back(Data.ImplicitCopyAssignmentHasConstParam);<br class="">- Record->push_back(Data.HasDeclaredCopyConstructorWithConstParam);<br class="">- Record->push_back(Data.HasDeclaredCopyAssignmentWithConstParam);<br class="">+<br class="">+ #define FIELD(Name, Width, Merge) \<br class="">+ Record->push_back(Data.Name);<br class="">+ #include "clang/AST/CXXRecordDeclDefinitionBits.def"<br class=""><br class=""> // getODRHash will compute the ODRHash if it has not been previously computed.<br class=""> Record->push_back(D->getODRHash());<br class="">@@ -6210,7 +6166,9 @@ void ASTRecordWriter::AddCXXDefinitionDa<br class=""> AddCXXBaseSpecifiers(Data.vbases());<br class=""><br class=""> AddUnresolvedSet(Data.Conversions.get(*Writer->Context));<br class="">- AddUnresolvedSet(Data.VisibleConversions.get(*Writer->Context));<br class="">+ Record->push_back(Data.ComputedVisibleConversions);<br class="">+ if (Data.ComputedVisibleConversions)<br class="">+ AddUnresolvedSet(Data.VisibleConversions.get(*Writer->Context));<br class=""> // Data.Definition is the owning decl, no need to write it.<br class=""> AddDeclRef(D->getFirstFriend());<br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">cfe-commits mailing list<br class=""><a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits<br class=""></div></div></blockquote></div><br class=""></div></div></body></html>