Getting type of ParmVarDecl of type defined in a header

Hi to all,

Given the following code:

typedef struct {
int x;
int y;
} MyStruct;

int foo(MyStruct s) …

I want to get the type of the parameter s.
In case the typedef appears in the main file, I have no problem and paramVarDecl->getType().getAsString() return “MyStruct”.
But when I put the typedef in a header and include it in the main file, paramVarDecl->getType().getAsString() returns “int” for some reason.

This is how I initialize the Header Search related objects:

// Apply header search
_hsOpts->UseStandardIncludes = true;
_hsOpts->UseBuiltinIncludes = true;
_hsOpts->UseStandardCXXIncludes = true;

// TODO Add user header search directories (I_dirs) ???

llvm::Triple triple(_tarOpts.Triple);
ApplyHeaderSearchOptions(*_hs, *_hsOpts, _langOpts, triple);

// For searching and including Headers into the source files we are analyzing
InitializePreprocessor(*_pp, *_ppOpts, *_hsOpts, *_fendOpts);

Am I missing something here?

Thanks in advance,