mirror of
https://github.com/nasa/trick.git
synced 2025-06-23 01:08:52 +00:00
Fix io code for classes with excluded parents
Check the return value of CXXRecordVisitor::TraverseCXXRecordDecl and don't add information from excluded parents. Add a parameter to PrintAttributes::isHeaderExcluded to toggle exlusion of TRICK_EXT_LIB_DIRS paths. When traversing a CXX record, we don't actually want to skip these paths since their io code should exist in the Trickified library. Fix memory leak. Refs #435
This commit is contained in:
@ -481,7 +481,7 @@ bool PrintAttributes::isIgnored(ConstructValues& constructValues) {
|
||||
return ignored;
|
||||
}
|
||||
|
||||
bool PrintAttributes::isHeaderExcluded(const std::string& header) {
|
||||
bool PrintAttributes::isHeaderExcluded(const std::string& header, bool exclude_ext_libs) {
|
||||
char* temp = almostRealPath(header.c_str());
|
||||
if (!temp) {
|
||||
return true;
|
||||
@ -494,7 +494,7 @@ bool PrintAttributes::isHeaderExcluded(const std::string& header) {
|
||||
* - in system directories
|
||||
* - in TRICK_EXCLUDE directories
|
||||
* - in TRICK_ICG_EXCLUDE directories
|
||||
* - in TRICK_EXT_LIB_DIRS directories
|
||||
* - in TRICK_EXT_LIB_DIRS directories (if requested)
|
||||
* - whose Trick header comments preclude ICG
|
||||
*/
|
||||
if (!hsd.isPathInUserDir(path)) {
|
||||
@ -515,7 +515,7 @@ bool PrintAttributes::isHeaderExcluded(const std::string& header) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (hsd.isPathInExtLib(path)) {
|
||||
if (hsd.isPathInExtLib(path) && exclude_ext_libs) {
|
||||
if (verboseBuild) {
|
||||
std::cout << skipping << "TRICK_EXT_LIB_DIRS: " << underline(path, hsd.getPathInExtLib(path).size()) << std::endl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user