[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] A bunch of more or less related issues
From:       Olaf Krzikalla <Olaf.Krzikalla () tu-dresden ! de>
Date:       2009-06-30 10:06:19
Message-ID: 4A49E39B.4050008 () tu-dresden ! de
[Download RAW message or body]

Hi @clang,

take this post as an answer to all responses.

Eli Friedman schrieb:
> On Mon, Jun 29, 2009 at 9:06 AM, Olaf
> Krzikalla<Olaf.Krzikalla@tu-dresden.de> wrote:
>   
>> Hi @clang,
>>
>> while working on AST processing I stumbled over the one or another
>> little quirk. I like to point them out now before the list becomes too long:
>>
>> 1. Why StmtPrinter::Indent always indent with two spaces hence
>> effectively doubling the indent? It cost me a while to find that out as
>> it is IMHO unexprected.
>>     
>
> From a brief investigation, I think that's simply a bug; patch welcome.
>   
OK. I hope it's not a big problem, since existing code works a little
bit different after the change, i.e. it doesn't conform to the 'one true
way' by default anymore ;).

>> 2. What is the full expression according to ISO in "if (int a = expr)"?
>> IMHO it is expr, but I'm not really sure since I saw CXXConditionDeclExpr.
>>     
>
> ISO isn't really relevant here, I think.  The way the AST is
> structured, the if statement contains an CXXConditionDeclExpr, which
> references the decl; "expr" is simply the intialializer for "a".
>   
This one I should elaborate: what I have here is a new function
ParentMap::getFullExpression. At the moment this function simply
traverses the parent statement tree until a non-expr statement is found.
Of course I want to have the function doing its thing right, that is
yield the full expression according to ISO. Thatswhy I'm asking: IMHO  I
should handle CXXConditionDeclExpr like a non-expr statement, but I'm
only 99% sure.

For the rest I'm going to post patches in the near future (probably
despite the seimcolon issue).

Best
Olaf Krzikalla

_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic