[PATCH] Eliminate BinaryTypeTraitExpr

Richard Smith richard at metafoo.co.uk
Fri Dec 13 10:23:27 PST 2013


     case EXPR_BINARY_TYPE_TRAIT:
-      S = new (Context) BinaryTypeTraitExpr(Empty);
+      llvm_unreachable("obsolete");
       break;

Please just remove this, and EXPR_BINARY_TYPE_TRAIT.


I don't really like having BTT_* and TT_* in the same enum, with default:
clauses appearing in various switches. Are you planning on folding the
trait-handling code together more (and dropping the 'B')? If so, looks fine
as a step towards that.


On Fri, Dec 13, 2013 at 6:58 AM, Alp Toker <alp at nuanti.com> wrote:

> Forgot to mention, this is built on top of the MSVC 2013 type trait
> support patch which has yet to land. Delta should be small though.
>
> Alp.
>
>
> On 13/12/2013 14:56, Alp Toker wrote:
>
>> There's nothing special about type traits accepting two arguments.
>>
>> The attached patch eliminates BinaryTypeTraitExpr and switches all
>> related handling over to TypeTraitExpr.
>>
>> Also fixes a CodeGen failure with variadic type traits appearing in a
>> non-constant expression.
>>
>> The BTT/TT prefix distinction is retained for the time being.
>>
>> This is part of the ongoing work to unify type traits.
>>
>>  26 files changed, 62 insertions(+), 289 deletions(-)
>>
>> Alp.
>>
>>
> --
> http://www.nuanti.com
> the browser experts
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131213/313ef523/attachment.html>


More information about the cfe-commits mailing list