1// RUN: %check_clang_tidy -std=c++23 %s misc-unconventional-assign-operator %t
2
3struct BadArgument {
4 BadArgument &operator=(this BadArgument& self, BadArgument &);
5 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: operator=() should take 'BadArgument const&', 'BadArgument&&' or 'BadArgument'
6};
7
8struct GoodArgument {
9 GoodArgument &operator=(this GoodArgument& self, GoodArgument const &);
10};
11

Provided by KDAB

Privacy Policy
Learn to use CMake with our Intro Training
Find out more

source code of clang-tools-extra/test/clang-tidy/checkers/misc/unconventional-assign-operator-cxx23.cpp