ICG still processing comments in files it is supposed to skip, one more time

Tested the name of the header file right when a class is starting processing.  If
the class is in a file that is in an ICG_EXCLUDE directory, we quit processing
right there.

refs #251
This commit is contained in:
Alex Lin 2016-06-15 17:41:39 -05:00
parent 4a54ff169b
commit bb3a788c5f

View File

@ -149,7 +149,18 @@ bool CXXRecordVisitor::VisitCXXRecordDecl( clang::CXXRecordDecl *rec ) {
cval.setHasPublicDestructor(true) ;
}
cval.setFileName(getFileName(ci , rec->getRBraceLoc(), hsd)) ;
std::string file_name = getFileName(ci , rec->getRBraceLoc(), hsd) ;
char * rp = almostRealPath(file_name.c_str()) ;
if ( rp == NULL ) {
return false ;
}
if ( hsd.isPathInICGExclude(rp) ) {
free(rp) ;
return false ;
}
cval.setFileName(rp) ;
free(rp) ;
cval.setAbstract(rec->isAbstract()) ;
cval.setName(rec->getNameAsString()) ;
cval.setPOD(rec->isPOD()) ;