brintos

brintos / llvm-project-archived public Read only

0
0
Text · 383 B · d6e9ebe Raw
13 lines · cpp
1// RUN: %check_clang_tidy -std=c++14-or-later %s misc-unconventional-assign-operator %t -- -- -fno-delayed-template-parsing2 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