[cfe-commits] [Patch] PR14922 - Improve Attr::printPretty
Michael Han
fragmentshaders at gmail.com
Thu Jan 17 12:17:11 PST 2013
Thanks, attached the test patch. SemaDeclAttr is slightly modified to
include the spelling index on creating an Attr for the attributes that
covered in tests, and I'll update all attributes later as a separate patch.
One issue found by the tests is the argument list of align attribute:
def Aligned : InheritableAttr {
let Spellings = [GNU<"aligned">, GNU<"align">, CXX11<"gnu", "aligned">];
let Subjects = [NonBitField, NormalVar, Tag];
let Args = [AlignedArgument<"Alignment">, BoolArgument<"IsMSDeclSpec">];
}
Here the IsMSDeclSpec argument is not modeled from the source format of
this attribute (e.g. __attribute__((aligned(...))) will always take a
single argument instead of two), so my feeling is this is a hack and should
be fixed and I prefer including the fix in a separate patch.
Michael
On Wed, Jan 16, 2013 at 7:12 PM, Richard Smith <richard at metafoo.co.uk>wrote:
> test/Sema/ast-print.c, test/SemaCXX/ast-print.cpp, and
> test/SemaCXX/cxx11-ast-print.cpp look like good places to start.
>
> On Wed, Jan 16, 2013 at 7:09 PM, Michael Han <fragmentshaders at gmail.com>
> wrote:
> > Agree, any suggestions on where / how to add the tests? I don't find any
> > existing regression tests that cover attributes print.
> >
> > Michael
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130117/37468349/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: attr-print-test.patch
Type: application/octet-stream
Size: 5419 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130117/37468349/attachment.obj>
More information about the cfe-commits
mailing list