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:
Derek Bankieris
2017-05-24 09:57:07 -05:00
parent 56bdafc68b
commit 1dbeb3e2d4
4 changed files with 26 additions and 25 deletions

View File

@ -155,10 +155,11 @@ void HeaderSearchDirs::AddDirsAndFiles(std::string env_var, std::vector<std::str
std::ifstream file_or_dir(resolved_path) ;
file_or_dir.seekg(0, std::ios::end) ;
if ( !file_or_dir.good()) {
var_list.push_back(std::string(resolved_path) + std::string("/"));
var_list.push_back(std::string(resolved_path) + "/");
} else {
var_list.push_back(std::string(resolved_path));
}
free(resolved_path);
} else {
std::cout << bold(color(WARNING, "Warning")) << " Cannot find " <<
env_var << " path " << quote(bold(item)) << std::endl ;