[patch] properly escape strings in xml output + re-enable utest for ast-print-xml

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch] properly escape strings in xml output + re-enable utest for ast-print-xml

Sebastien Binet
hi,

this patch properly addresses escaping < and > which might appear
(e.g. for C++ operators) in the xml dump.

I also re-enabled the unit test for ast-print-xml (or so I think)
at least, make test didn't fail...

cheers,
sebastien.


--
#########################################
# Dr. Sebastien Binet
# Laboratoire de l'Accelerateur Lineaire
# Universite Paris-Sud XI
# Batiment 200
# 91898 Orsay
#########################################
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [patch] properly escape strings in xml output + re-enable utest for ast-print-xml

Chris Lattner
ENOPATCH :-)

On May 11, 2010, at 9:58 AM, Sebastien Binet wrote:

> hi,
>
> this patch properly addresses escaping < and > which might appear
> (e.g. for C++ operators) in the xml dump.
>
> I also re-enabled the unit test for ast-print-xml (or so I think)
> at least, make test didn't fail...
>
> cheers,
> sebastien.
>
>
> --
> #########################################
> # Dr. Sebastien Binet
> # Laboratoire de l'Accelerateur Lineaire
> # Universite Paris-Sud XI
> # Batiment 200
> # 91898 Orsay
> #########################################
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [patch] properly escape strings in xml output + re-enable utest for ast-print-xml

Sebastien Binet
Excerpts from Chris Lattner's message of 2010-05-11 19:04:16 +0200:
> ENOPATCH :-)

arf !

>
> On May 11, 2010, at 9:58 AM, Sebastien Binet wrote:
>
> > hi,
> >
> > this patch properly addresses escaping < and > which might appear
> > (e.g. for C++ operators) in the xml dump.
> >
> > I also re-enabled the unit test for ast-print-xml (or so I think)
> > at least, make test didn't fail...
> >
> > cheers,
> > sebastien.
> >
> >
> > --
> > #########################################
> > # Dr. Sebastien Binet
> > # Laboratoire de l'Accelerateur Lineaire
> > # Universite Paris-Sud XI
> > # Batiment 200
> > # 91898 Orsay
> > #########################################
> > _______________________________________________
> > cfe-dev mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
--
#########################################
# Dr. Sebastien Binet
# Laboratoire de l'Accelerateur Lineaire
# Universite Paris-Sud XI
# Batiment 200
# 91898 Orsay
#########################################

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

properly.escape.strings.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [patch] properly escape strings in xml output + re-enable utest for ast-print-xml

Chris Lattner

On May 11, 2010, at 10:06 AM, Sebastien Binet wrote:

> Excerpts from Chris Lattner's message of 2010-05-11 19:04:16 +0200:
>> ENOPATCH :-)
>
> arf !

Is this hunk intended?

+++ lib/Frontend/DeclXML.cpp (working copy)
@@ -49,7 +49,7 @@
     addSubNodes(cast<RecordDecl>(RD));
 
     if (RD->isDefinition()) {
-      Doc.addAttribute("num_bases", RD->getNumBases());
+      //Doc.addAttribute("num_bases", RD->getNumBases());
 
-Chris

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [patch] properly escape strings in xml output + re-enable utest for ast-print-xml

Sebastien Binet
Excerpts from Chris Lattner's message of 2010-05-11 19:13:42 +0200:

>
> On May 11, 2010, at 10:06 AM, Sebastien Binet wrote:
>
> > Excerpts from Chris Lattner's message of 2010-05-11 19:04:16 +0200:
> >> ENOPATCH :-)
> >
> > arf !
>
> Is this hunk intended?
>
> +++ lib/Frontend/DeclXML.cpp    (working copy)
> @@ -49,7 +49,7 @@
>      addSubNodes(cast<RecordDecl>(RD));
>  
>      if (RD->isDefinition()) {
> -      Doc.addAttribute("num_bases", RD->getNumBases());
> +      //Doc.addAttribute("num_bases", RD->getNumBases());

yes (I should indeed have documented it)
the problem is that by re-using the dumping code for RecordDecl, the
CXXRecordDecl node is already closed by the time one tries to add this
new num_bases attribute.

something better needs to be done here, but fixing the XML generation
was the priority :)

cheers,
sebastien.
--
#########################################
# Dr. Sebastien Binet
# Laboratoire de l'Accelerateur Lineaire
# Universite Paris-Sud XI
# Batiment 200
# 91898 Orsay
#########################################
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [patch] properly escape strings in xml output + re-enable utest for ast-print-xml

Chris Lattner
Thanks, applied in r103671

On May 11, 2010, at 10:21 AM, Sebastien Binet wrote:

> Excerpts from Chris Lattner's message of 2010-05-11 19:13:42 +0200:
>>
>> On May 11, 2010, at 10:06 AM, Sebastien Binet wrote:
>>
>>> Excerpts from Chris Lattner's message of 2010-05-11 19:04:16 +0200:
>>>> ENOPATCH :-)
>>>
>>> arf !
>>
>> Is this hunk intended?
>>
>> +++ lib/Frontend/DeclXML.cpp    (working copy)
>> @@ -49,7 +49,7 @@
>>     addSubNodes(cast<RecordDecl>(RD));
>>
>>     if (RD->isDefinition()) {
>> -      Doc.addAttribute("num_bases", RD->getNumBases());
>> +      //Doc.addAttribute("num_bases", RD->getNumBases());
>
> yes (I should indeed have documented it)
> the problem is that by re-using the dumping code for RecordDecl, the
> CXXRecordDecl node is already closed by the time one tries to add this
> new num_bases attribute.
>
> something better needs to be done here, but fixing the XML generation
> was the priority :)
>
> cheers,
> sebastien.
> --
> #########################################
> # Dr. Sebastien Binet
> # Laboratoire de l'Accelerateur Lineaire
> # Universite Paris-Sud XI
> # Batiment 200
> # 91898 Orsay
> #########################################

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev