For a CXXRecordDecl the RecordDeclBits are stored in the DeclContext. Currently when we import the definition of a CXXRecordDecl via the ASTImporter we do not copy over this data.
We had a LLDB expression parsing bug where we would set it to not pass in registers:
but when imported this setting would be lost. So dumping the CXXRecordDecl before importing we would see:
CXXRecordDecl 0x7faaba292e50 <<invalid sloc>> <invalid sloc> struct Bounds definition |-DefinitionData standard_layout has_user_declared_ctor can_const_default_init ...
but after importing it would show the following:
CXXRecordDecl 0x7ff286823c50 <<invalid sloc>> <invalid sloc> struct Bounds definition |-DefinitionData pass_in_registers standard_layout has_user_declared_ctor can_const_default_init ^^^^^^^^^^^^^
There will be a separate LLDB PR that will have a test that covers this and introduces a related fix for LLDB.
Note, we did not copy over any other of the RecordDeclBits since we don't have tests for those. We know that copying over LoadedFieldsFromExternalStorage would be a error and that may be the case for others as well.
The companion LLDB review: https://reviews.llvm.org/D61146