[cfe-commits] r76159 - in /cfe/trunk: include/clang/Index/ASTLocation.h lib/Index/ASTLocation.cpp

Argyrios Kyrtzidis kyrtzidis at apple.com
Fri Jul 17 00:23:44 PDT 2009


On Jul 16, 2009, at 11:58 PM, Zhongxing Xu wrote:

> Author: zhongxingxu
> Date: Fri Jul 17 01:58:08 2009
> New Revision: 76159
>
> URL: http://llvm.org/viewvc/llvm-project?rev=76159&view=rev
> Log:
> Relax the assertion in ASTLocation's ctor: if the decl is not the  
> immediate
> parent of the stmt, find the immediate parent for the stmt.
>
> This is because sometimes we cannot get the immediate decl of the  
> stmt when
> creating the ASTLocation. We can only get a parent of the stmt.

Hi Zhongxing,

Instead of removing the assertion and subtly changing the Decl that is  
stored in the ASTLocation,
how about we make "FindImmediateParent" a public static method of  
ASTLocation so it can be used
for the cases when "we cannot get the immediate decl of the stmt when  
creating the ASTLocation" ?

-Argiris



More information about the cfe-commits mailing list