icg default constructor is deleted (#1109)

* check if default constructor is deleted #1094

* unit test icg deleted default constructor #1094

* Update centos 7 swig version to 3.0 to support deleted function in SIM_deleted_default_constructor test

Co-authored-by: Fennell, Scott P 263712616 <scott.p.fennell@nasa.gov>

closes #1094
This commit is contained in:
Scott Fennell
2021-02-05 19:32:36 -06:00
committed by GitHub
parent e56b32cc2d
commit c0791b46d9
12 changed files with 82 additions and 17 deletions

View File

@ -172,7 +172,7 @@ bool CXXRecordVisitor::VisitCXXRecordDecl( clang::CXXRecordDecl *rec ) {
// Test all constructors to see if any of those are the default and public
clang::CXXRecordDecl::ctor_iterator cit ;
for ( cit = rec->ctor_begin() ; cit != rec->ctor_end() ; cit++ ) {
if ( (*cit)->isDefaultConstructor() and (*cit)->getAccess() == clang::AS_public ) {
if ( ( !(*cit)->isDeleted() ) and (*cit)->isDefaultConstructor() and (*cit)->getAccess() == clang::AS_public ) {
cval.setHasDefaultConstructor(true) ;
}
}