It seems strange to me to build a TypeSourceInfo for a type that was not actually written. Maybe you could add an 'else' to TraverseFunctionHelper's if (TypeSourceInfo *TSI = D->getTypeSourceInfo()) to visit the parameters of the function decl? http://llvm-reviews.chandlerc.com/D958