if_diff/src/idfMatchAst.cxx
//============================================================================
// Returns whether the AST node is regarded as uninteresting on account
// of the -interesting option (global idf_interesting_filename).
// To be uninteresting, the node must be actively uninteresting, by either
// being NULL, or if idf_interesting_filename is non-null, the node must
// have at least one explicit filename that does not match the interesting
// filename, and no explicit, matching filename.
//============================================================================
Returns whether the AST node is regarded as uninteresting on account
of the -interesting option (global idf_interesting_filename).
To be uninteresting, the node must be actively uninteresting, by either
being NULL, or if idf_interesting_filename is non-null, the node must
have at least one explicit filename that does not match the interesting
filename, and no explicit, matching filename.
Returns whether the AST node is regarded as uninteresting on account of the - interesting option ( global idf_interesting_filename ) . To be uninteresting the node must be actively uninteresting by either being NULL or if idf_interesting_filename is non - null the node must have at least one explicit filename that does not match the interesting filename and no explicit matching filename .
static boolean is_uninteresting(idfAst *ast)
{
  if (ast == NULL) {
    return true;
  }
  else {
    locationList *loc = ast->getLocation();
    if (loc == NULL) {
      return false;
    }
    else if (idf_interesting_filename == NULL) {
      return false;
    }
    else {
      int len = loc->size();
      boolean found_non_interesting_file = false;
      for (int i = 0; i < len; i += 1) {
	const char *fn = (*loc)[i]->filename;
	if (fn != NULL) {
	  if (idf_filename_match(fn, idf_interesting_filename)) {
	    return false;
	  }
	  else {
	    found_non_interesting_file = true;
	  }
	}
      }
      return found_non_interesting_file;
    }
  }
}
static boolean is_uninteresting ( idfAst * ast ) { if ( ast == NULL ) { return true ; } else { locationList * loc = ast -> getLocation ( ) ; if ( loc == NULL ) { return false ; } else if ( idf_interesting_filename == NULL ) { return false ; } else { int len = loc -> size ( ) ; boolean found_non_interesting_file = false ; for ( int i = 0 ; i < len ; i += 1 ) { const char * fn = ( * loc ) [ i ] -> filename ; if ( fn != NULL ) { if ( idf_filename_match ( fn , idf_interesting_filename ) ) { return false ; } else { found_non_interesting_file = true ; } } } return found_non_interesting_file ; } } }
Returns whether the AST node is regarded as uninteresting on account
of the -interesting option (global idf_interesting_filename).
Returns whether the AST node is regarded as uninteresting on account of the - interesting option ( global idf_interesting_filename ) .