I doubt you'll find something like that. To be useful, it would have to be able to parse several situations, such as these:
pinMode(2,INPUT);
#define PIN_WHATEVER 4
pinMode(PIN_WHATEVER,INPUT_PULLUP);
#define START_PIN 5
#define NUMBER_PINS 4
for(int i = 0;i < NUMBER_PINS;i++) {
pinMode(i+START_PIN,OUTPUT);
}
uint8_t pins[] = {2,5,8,11,4};
for(int i = 0;i < sizeof(pins);i++) {
pinMode(pins[i],INPUT);
}
Then there's the problem of libraries which set the pinMode internally - e.g. SD.h
It isn't difficult to do this yourself since you just need to search the code for "pinMode" and then make a list of the pins that are referenced.
BTW, this doesn't handle the analog pins which don't need to have pinMode set.
Pete