how to determine a parameter has a type declaratorinclang

i tried

QualType t;
TypeLoc loc = p->getTypeSourceInfo()->getTypeLoc();
printf("%d\n", loc.getTypeLocClass()); // built-in class
t = p->getTypeSourceInfo()->getType(); // t.getAsString() → “int”
t = loc.getType); // t.getAsString() → “int”
printf("%s\n", t.getAsString().c_str()); // int

void func(int a, b)

i still get int for b. Can you give me more details on how to use this methods ?

------------------ Original ------------------