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