From 5a70ea6c75e9caced85ec0aa1d4d60195bafc6cf Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Tue, 29 Sep 2009 19:58:16 +0000 Subject: [PATCH] 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 --- lib/Index/ResolveLocation.cpp | 3 +++ 1 file changed, 3 insertions(+) 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) { -- 2.50.1