On Sat, Nov 17, 2012 at 8:47 PM, Grzegorz Jablonski <[email protected]> wrote:
> On 11/10/2012 12:35 AM, Eli Friedman wrote:
>>
>> On Wed, Oct 31, 2012 at 9:27 AM, Jordan Rose <[email protected]>
>> wrote:
>>>
>>> [...]
>>>
>>> If you're okay with adding a PrintImplicitNodes bit to PrintingPolicy
>>> that
>>> would be good enough for us. Otherwise we'll have to think of something
>>> else.
>>
>> This seems okay to me. Grzegorz?
>
> Patch attached.
else
- D->print(Out, /*Indentation=*/0, /*PrintInstantiation=*/true);
+ {
+ PrintingPolicy Policy(D->getASTContext().getPrintingPolicy());
+ Policy.PrintImplicitNodes=false;
Mechanical issues: '{' on the same line as 'else' and spaces around '='.
Non-mechanical issue: making -ast-dump differ from Decl->dump() might
not be a good idea.
+ /// \brief When true, do print implicit nodes.
+ ///
+ bool PrintImplicitNodes : 1;
Empty line in comments is not needed.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits