[PATCH] D123605: [WIP][Sema][SVE] Move/simplify Sema testing for SVE ACLE builtins

Rosie Sumpter via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 28 01:19:58 PDT 2022


RosieSumpter added inline comments.


================
Comment at: clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_n.cpp:25
+{
+  // expected-error-re at +1 3 {{argument value {{[0-9]+}} is outside the valid range [0, 7]}}
+  EXPAND_XZM_FUNC(SVE_ACLE_FUNC(svqshlu,_n_s8,,), pg, svundef_s8(), -1);
----------------
paulwalker-arm wrote:
> I've not seen this before, presumably it's short hand instead of needing to repeat multiple identical `expected-error` check lines?  If so, is it worth using this throughout the test files and essentially only require one `expected-error` per function or does this only work here because the `EXPAND...` macro emits its three function calls on the same line?
Yes it lets you specify how many times you expect the diagnostic to appear, but as you said it only works when the diagnostics are emitted on the same line so I'm not sure there's a way to reduce the number of `expected-error` lines any more than this


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123605/new/

https://reviews.llvm.org/D123605



More information about the cfe-commits mailing list