How can I get the SourceLocation?

hello,
   I want to get the SourceLocation for this example like it:
  for (i = 0; i < 5; i++)
{
    //something
     printf("%d",num[i]);
   //something
}
Now I can get the SourceLocation about num[i],How can I get the
SourceLocation about the "printf"?Your response is my expected!