Resolve a source location inside the return type of a functon.

llvm-svn: 83101
This commit is contained in:
Argyrios Kyrtzidis 2009-09-29 19:58:16 +00:00
parent 5d58383ea9
commit f881301d3a
1 changed files with 3 additions and 0 deletions

View File

@ -220,6 +220,9 @@ ASTLocation DeclLocResolver::VisitFunctionDecl(FunctionDecl *D) {
assert(ContainsLocation(D) &&
"Should visit only after verifying that loc is in range");
if (ContainsLocation(D->getDeclaratorInfo()))
return ResolveInDeclarator(D, 0, D->getDeclaratorInfo());
// First, search through the parameters of the function.
for (FunctionDecl::param_iterator
I = D->param_begin(), E = D->param_end(); I != E; ++I) {