[cfe-commits] r83101 - /cfe/trunk/lib/Index/ResolveLocation.cpp

Argiris Kirtzidis akyrtzi at gmail.com
Tue Sep 29 12:58:17 PDT 2009


Author: akirtzidis
Date: Tue Sep 29 14:58:16 2009
New Revision: 83101

URL: http://llvm.org/viewvc/llvm-project?rev=83101&view=rev
Log:
Resolve a source location inside the return type of a functon.

Modified:
    cfe/trunk/lib/Index/ResolveLocation.cpp

Modified: cfe/trunk/lib/Index/ResolveLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/ResolveLocation.cpp?rev=83101&r1=83100&r2=83101&view=diff

==============================================================================
--- cfe/trunk/lib/Index/ResolveLocation.cpp (original)
+++ cfe/trunk/lib/Index/ResolveLocation.cpp Tue Sep 29 14:58:16 2009
@@ -220,6 +220,9 @@
   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) {





More information about the cfe-commits mailing list