philnik777 wrote:

I think clang should reject incomplete types when the standard says so. It 
doesn't seem particularly useful to accept some special cases but reject 
incomplete types in general. All the traits should probably be audited once. It 
looks like Clang has other problematic cases: https://godbolt.org/z/hajWfq7a6

I don't really care whether Clang should reject VLAs when using the builtin, 
since the trait will be used through some template and that's rejected that 
anyways. FWIW it'd be more consistent, since in my mind `__some_type_trait(T, 
U)` behaves the same as `std::some_type_trait_v<T, U>`.

Flexible arrays are accepted because they are arrays of unknown bounds in the 
type system, which is part of the standard. The extension is only that they 
aren't rejected at the end of a struct and have some special meaning there. 
They should definitely not be rejected.


https://github.com/llvm/llvm-project/pull/87737
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to