[PATCH] Add PragmaAttr and Pragma Spelling to Tablegen

Tyler Nowicki tnowicki at apple.com
Fri Jun 6 14:13:02 PDT 2014


Hi Aaron,

I noticed that 'pragma-loop-ast.cpp' wasn’t committed along with the first patch. I think this test is close to the print pretty test you are asking for. The pragma needs to be defined before a loop to pass parsing so that is the minimum amount of code to use the pragma. Also it uses -ast-print and verifies that the result matches the expected print pretty string.

Here is the patch rebased against master with the calf patch applied and I moved pragma-loop-ast.cpp to test/Sema/pragma-loop.cpp.

Thanks,

Tyler

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pragma_tablegen2.patch
Type: application/octet-stream
Size: 8523 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140606/4bec06e0/attachment.obj>
-------------- next part --------------

On Jun 6, 2014, at 6:00 AM, Aaron Ballman <aaron at aaronballman.com> wrote:

> On Thu, Jun 5, 2014 at 10:17 PM, Tyler Nowicki <tnowicki at apple.com> wrote:
>> Hi Aaron,
>> 
>> Thanks for the review!
>> 
>> I’ve made the changes you suggested except for adding the tests. I mighty be mistaken, but don’t the tests in the first patch test/PCH/pragma-loop.cpp and test/Parser/pragma-loop-ast.cpp verify that pretty printing is outputting the correct pragma? Is there another place for tests specific to pretty printing?
> 
> PCH tests that serialization and unserialization work. AST tests that
> the AST representation has the correct information. What I was looking
> for was something akin to test/Sema/attr-print.c where you use
> -ast-print, which exercises the pretty printing functionality to make
> sure that the new printing functionality works as expected.
> 
> Aside from the test, LGTM!
> 
> If you need me to commit for you, I'd appreciate if you would rebase
> off ToT (I get merge conflicts currently).
> 
> Thanks!
> 
> ~Aaron



More information about the cfe-commits mailing list