[PATCH] D75571: [Sema][SVE] Add tests for valid and invalid type usage

Richard Sandiford via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 3 15:00:36 PST 2020


rsandifo-arm created this revision.
rsandifo-arm added reviewers: sdesmalen, efriedma, rovka, rjmccall.
Herald added subscribers: cfe-commits, psnobl, jfb, rkruppe, tschuett.
Herald added a reviewer: rengolin.
Herald added a project: clang.
rsandifo-arm added a child revision: D75572: [Sema][SVE] Reject sizeof and alignof for sizeless types.

This patch adds C and C++ tests for various uses of SVE types.
The tests cover valid uses that are already (correctly) accepted and
invalid uses that are already (correctly) rejected.  Later patches
will expand the tests as they fix other cases.[*]

Some of the tests for invalid uses aren't obviously related to
scalable vectors.  Part of the reason for having them is to make
sure that the quality of the error message doesn't regress once/if
the types are treated as incomplete types.

[X] These later patches all fix invalid uses that are being incorrectly accepted.  I don't know of any cases in which valid uses are being incorrectly rejected.  In other words, this series is all about diagnosing invalid code rather than enabling something new.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75571

Files:
  clang/test/Sema/sizeless-1.c
  clang/test/SemaCXX/sizeless-1.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75571.248041.patch
Type: text/x-patch
Size: 33667 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200303/35e2aa14/attachment-0001.bin>


More information about the cfe-commits mailing list