[cfe-dev] Broken sizeof(expr) location in SemaExpr.cpp

Xi Wang xi.wang at gmail.com
Sun May 29 08:26:52 PDT 2011


Cool.  It works for me.  Everything looks great.  Thanks!

- xi

On Sun, May 29, 2011 at 3:38 AM, Chandler Carruth <chandlerc at google.com> wrote:
> On Sat, May 28, 2011 at 3:09 PM, Xi Wang <xi.wang at gmail.com> wrote:
>> Cool.  Thanks a lot.  I would suggest to add the two parameters OpLoc
>> and ArgRange back.
>
> ArgRange shouldn't be needed. The entire argument is an expression, so
> the expression should have the proper source range for the argument
> tokens. The location of the operator itself was what we lost here.
>
>>  This interface change also affects Sema.h and
>> TreeTransform.h.
>
> Yep, I changed it before, so I'm aware.
>
>> BTW, the assertion you wanted might be "ArgEx->getExprLoc() == OpLoc" ;-)
>
> I had exactly this assertion.... but I inverted the logic sadly. =[
> Sorry for the problems, I wouldn't have removed OpLoc except that I
> thought my assertion had proven its futility... doh!
>
> All fixed in r132284. I've manually verified yours and several other
> test cases, but let me know if something still isn't working.




More information about the cfe-dev mailing list