From 9509924b640c0a731d9b32e604ae05616f496d7e Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Tue, 19 Dec 2017 08:26:52 -0600 Subject: [PATCH] Don't create attributes for class members that are of private embedded class types #534 Test the class field type. If the type is a private embedded class mark the field as io=0 so we don't create attributes for the field. --- trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp b/trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp index ea115422..91d637ef 100644 --- a/trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp +++ b/trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp @@ -474,6 +474,12 @@ bool FieldVisitor::VisitRecordType(clang::RecordType *rt) { return false ; } + // If the type is a private embedded class there will not be any io_src code for the type. Don't create attributes + if ( CXXRecordVisitor::isPrivateEmbeddedClass(tst_string) ) { + //std::cout << "Type is a private embedded class!" << std::endl ; + fdes->setIO(0) ; + return false ; + } /* Template specialization types will be processed here because the canonical type will be typed as a record. We test if we have a template specialization type. If so process the template type and return */