ilya-biryukov wrote:

Thanks for reverting it and sorry for the trouble, I will make sure to check 
libc++ tests before a reland.
Clang does report less errors now, but that's expected. The errors were 
spurious, caused by Clang trying to initialize an "invalid" class (more details 
below in case you're interested).

Failed `static_assert` is what made the class invalid in the first place and 
Clang fails parenthesized initialization of such classes early now. We should 
not do parenthesized initialization here as it should only be applied to 
aggregates, this class has constructors and is not an aggregate in the first 
place. The only reason we attempted aggregate init is because invalid classes 
are left internally in inconsistent states sometimes (there are many reasons 
why class is invalid). So less errors is better here, they were only adding 
noise and confusion in the first place.

I will reland the commit with updated libc++ tests. The commit did not change 
the set of correct programs that we compile, it's just showing less spurious 
errors.

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

Reply via email to