1// RUN: %check_clang_tidy -std=c++14-or-later %s misc-unconventional-assign-operator %t -- -- -fno-delayed-template-parsing
2
3struct BadModifier {
4 BadModifier& operator=(const BadModifier&) const;
5 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: operator=() should not be marked 'const'
6};
7
8struct PR35468 {
9 template<typename T> auto &operator=(const T &) {
10 return *this;
11 }
12};
13

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