Quantcast

How to write a test for bug 27981? (Missing LValueToRValue cast)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to write a test for bug 27981? (Missing LValueToRValue cast)

Ammarguellat, Zahira via cfe-dev
I have a fix for the following bug ready and would like to submit it for
review:

Bug 27981 - Missing LValueToRValue casts for use of
__builtin_shufflevector in function template instantiations
https://bugs.llvm.org//show_bug.cgi?id=27981

I'm not sure how to write a test for this though.  The issue is a
missing LValueToRValue cast.  Code gen is already tolerant of the
missing cast so isn't affected by the fix.  I'm not very familiar with
the infrastructure available in the Clang test suite.

Tom.
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to write a test for bug 27981? (Missing LValueToRValue cast)

Ammarguellat, Zahira via cfe-dev
Hi Tom,

If you expect the AST to stay stable, you can pass the output of -ast-dump to FileCheck and use FileCheck to confirm that the cast is there.  test/SemaCXX/template-implicit-vars.cpp is an example which uses this technique.  In addition, the documentation for FileCheck is at http://llvm.org/docs/CommandGuide/FileCheck.html

Since LValueToRValue casts are common, it would be better to use a CHECK followed by several CHECK-NEXT's since CHECK-NEXT does not allow extra lines between the previous check line.

Richard


On Thu, Feb 16, 2017 at 9:27 AM, Tom Honermann via cfe-dev <[hidden email]> wrote:
I have a fix for the following bug ready and would like to submit it for
review:

Bug 27981 - Missing LValueToRValue casts for use of
__builtin_shufflevector in function template instantiations
https://bugs.llvm.org//show_bug.cgi?id=27981

I'm not sure how to write a test for this though.  The issue is a
missing LValueToRValue cast.  Code gen is already tolerant of the
missing cast so isn't affected by the fix.  I'm not very familiar with
the infrastructure available in the Clang test suite.

Tom.
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...