jansvoboda11 added inline comments.
================ Comment at: clang/lib/Sema/SemaOverload.cpp:8982 // Extension: Add the binary operators =, +=, -=, *=, /= for vector types. for (QualType Vec1Ty : CandidateTypes[0].vector_types()) ---------------- jansvoboda11 wrote: > aaron.ballman wrote: > > Do we need to handle atomic vector types? > I tried those, but it appears vector types don't accept `_Atomic` element > types: > > ``` > typedef _Atomic unsigned v_a_unsigned __attribute__((__vector_size__(16))); > // error: invalid vector element type '_Atomic(unsigned int)' > ``` > > And `_Atomic` vector gives this error: > > ``` > typedef unsigned v_unsigned __attribute__((__vector_size__(16))); > typedef _Atomic v_unsigned a_v_unsigned; > > a_v_unsigned avu; > > void enum5() { avu += an_enum_value; } > void enum6() { avu |= an_enum_value; } > ``` > > I'm not an expert in this area, so I can't say for sure this is the correct > behavior. But at least we don't crash. > And `_Atomic` vector gives this error: ``` error: invalid operands to binary expression ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125349/new/ https://reviews.llvm.org/D125349 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits