mirror of
https://github.com/nasa/trick.git
synced 2025-01-19 03:06:23 +00:00
Pointers to STLs cannot be checkpointed. #552
Added code to disable printing of STLs if it is arrayed or has pointer dimensions.
This commit is contained in:
parent
a2d0387d57
commit
54b57bc351
@ -128,6 +128,10 @@ bool FieldVisitor::VisitBuiltinType(clang::BuiltinType *bt) {
|
||||
bool FieldVisitor::VisitConstantArrayType(clang::ConstantArrayType *cat) {
|
||||
//cat->dump() ; std::cout << std::endl ;
|
||||
fdes->addArrayDim(cat->getSize().getZExtValue()) ;
|
||||
// If this field is an arrayed STL, skip it!
|
||||
if ( fdes->isSTL() ) {
|
||||
fdes->setIO(0) ;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -249,6 +253,10 @@ bool FieldVisitor::VisitFieldDecl( clang::FieldDecl *field ) {
|
||||
|
||||
bool FieldVisitor::VisitPointerType(clang::PointerType *p) {
|
||||
fdes->addArrayDim(-1) ;
|
||||
// If this field is a pointer to an STL, skip it!
|
||||
if ( fdes->isSTL() ) {
|
||||
fdes->setIO(0) ;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -60,6 +60,9 @@ bool PrintFileContentsBase::isPrintable( ClassValues * c , FieldDescription * fd
|
||||
if ( !(fdes->getIO() & ioMask) || !fdes->getTypeName().compare("void") || !fdes->getEnumString().compare("TRICK_VOID")) {
|
||||
return false;
|
||||
}
|
||||
if ( fdes->isSTL() and fdes->getNumDims() ) {
|
||||
return false;
|
||||
}
|
||||
if ( fdes->getAccess() == clang::AS_public || (!fdes->isStatic() && !global_compat15 && !c->isCompat15())) {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user