From: Argyrios Kyrtzidis Date: Tue, 29 Sep 2009 19:58:16 +0000 (+0000) Subject: Resolve a source location inside the return type of a functon. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a70ea6c75e9caced85ec0aa1d4d60195bafc6cf;p=clang Resolve a source location inside the return type of a functon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83101 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Index/ResolveLocation.cpp b/lib/Index/ResolveLocation.cpp index d396a78282..633ed0590e 100644 --- a/lib/Index/ResolveLocation.cpp +++ b/lib/Index/ResolveLocation.cpp @@ -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) {