VarDecl hasinit() method not returning true for "function" initializer

Hi
I have a declaration and initializer to a variable of the form int x =
getval() - 5;
But, VarDecl->hasinit() returns a false for the above declaration.

Can anyone help me on this please?

Much appreciated.