[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded
Oksana Shadura via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 14 05:22:59 PDT 2018
ksu.shadura added a comment.
Hi,
we see the false-positive behavior of -Wno-self-assign-overloaded flag in case of subtraction assignment operator.
The minimal reproducer that we got: https://godbolt.org/g/8PQMpR
typedef int Int_t;
typedef double Double_t;
class TObject {};
template <class Element> class TMatrixTBase : public TObject {};
template <class Element> class TMatrixT : public TMatrixTBase<Element> {
public:
enum EMatrixCreatorsOp1 {
kZero,
kUnit,
kTransposed,
};
TMatrixT(){};
TMatrixT(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb){};
TMatrixT(EMatrixCreatorsOp1 op, const TMatrixT &prototype){};
TMatrixT<Element> &operator-=(const TMatrixT<Element> &source){return *this;};
};
typedef TMatrixT<Double_t> TMatrixD;
void stress_binary_ebe_op(Int_t rsize, Int_t csize) {
TMatrixD m(2, rsize + 1, 0, csize - 1);
TMatrixD m1(TMatrixD::kZero, m);
m1 -= m1;
}
Thanks in advance!
Repository:
rL LLVM
https://reviews.llvm.org/D45766
More information about the cfe-commits
mailing list