CLANG Function Def... How to get Entire SourceRange

I have 2 function prototypes

extern void myTestFunc(double a, int c);
extern “C” void myFunc2(int a, int c);

When i tried to get entire sourceRange for both, with FunctionDecl object ,
as
FunctionDecl *FD;
sourceLocation sBegin = FD->getLocStart();
sourceLocation sEnd = FD->getLocEnd();
sourceRange.setBegin(sBegin);
sourceRange.setEnd(sEnd);

The sourceRange for 1st is getting as :
extern void myTestFunc(double a, int c)

where as for second
void myFunc2(int a, int c)

Issue, is I want to get entire sourceRange for second. i.e
extern “C” void myFunc2(int a, int c)

So, how to get entire SourceRange?

Suhas Limaye.
Pune.

$ cat t.cc
extern "C" void f();

$ clang++ -cc1 -ast-dump-xml t.cc
[...]
<LinkageSpec ptr="0x38577f0" lang="C">
  <Function ptr="0x38872f0" name="f" prototype="true" storage="extern">
   <FunctionProtoType ptr="0x3857840" canonical="0x3857840">
    <BuiltinType ptr="0x3856c30" canonical="0x3856c30"/>
    <parameters/>
   </FunctionProtoType>
  </Function>
</LinkageSpec>

searching for LinkageSpec in the code base leads to LinkageSpecDecl,
which is a DeclContext, so without having verified it I'd expect
FD->getDeclContext() to give the LinkageSpecDecl in that case (but I'm
not sure).

Cheers,
/Manuel