jkorous added a comment.

In D125349#3509546 <https://reviews.llvm.org/D125349#3509546>, @ahatanak wrote:

> Is it not possible to handle this similarly to `volatile unsigned`? If I 
> replace `_Atomic unsigned` with `volatile unsigned`, I see 
> `LookupOverloadedBinOp` succeed without having to strip volatile because 
> `addAssignmentArithmeticOverloads` adds candidates with volatile types.

Possibly? I am just generally apprehensive about changing the C++ side of 
things as I can't imagine all the consequences.
One difference that I see is the existence of `volatile`-qualified versions of 
these operators being prescribed by C++ standard while the operators you 
suggest definitely aren't:

  // C++ [over.built]p18:
  //
  //   For every triple (L, VQ, R), where L is an arithmetic type,
  //   VQ is either volatile or empty, and R is a promoted
  //   arithmetic type, there exist candidate operator functions of
  //   the form

https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaOverload.cpp#L8926


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

Reply via email to