Debian Codegraph @

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

raw
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 };