llvm-project/clang/test/SemaSYCL
Mariya Podchishchaeva 52e8f58d49 [SYCL] Diagnose uses of zero length arrays
Adds diagnosing on attempt to use zero length arrays, pointers, refs, arrays
of them and structs/classes containing all of it.
In case a struct/class with zero length array is used this emits a set
of notes pointing out how zero length array got into used struct, like
this:
```
struct ContainsArr {
  int A[0]; // note: field of illegal type declared here
};
struct Wrapper {
  ContainsArr F; // note: within field of type ContainsArr declared here
  // ...
}

// Device code
Wrapper W;
W.use(); // error: zero-length arrays are not permitted

```
Total deep check of each used declaration may result in double
diagnosing at the same location.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D114080
2021-12-29 15:30:18 +03:00
..
address-space-conversions.cpp [SYCL] Enable `opencl_global_[host,device]` attributes for SYCL 2021-05-18 10:27:35 +03:00
float128.cpp [X86][clang] Disable long double type for -mno-x87 option 2021-11-03 12:08:39 +03:00
int128.cpp Reland [clang] Check unsupported types in expressions 2021-10-15 13:55:36 +03:00
kernel-attribute-on-non-sycl.cpp
kernel-attribute.cpp [SYCL] Rework the SYCL driver options 2021-03-17 08:27:19 -04:00
prohibit-thread-local.cpp [SYCL] Rework the SYCL driver options 2021-03-17 08:27:19 -04:00
unique-stable-name-multiple-target-crash.cpp Replace 'magic static' with a member variable for SCYL kernel names 2021-05-27 13:46:31 -07:00
unique_stable_name.cpp Change __builtin_sycl_unique_stable_name to just use an Itanium mangling 2021-09-28 06:41:03 -07:00
zero-length-arrays.cpp [SYCL] Diagnose uses of zero length arrays 2021-12-29 15:30:18 +03:00