Issue 153770
Summary [clang-tidy] False positive for misc-unconventional-assign-operator when the type has a forward declaration
Labels clang-tidy
Assignees
Reporter matthew-f
    There looks like a false positive for misc-unconventional-assign-operator when the type has a forward declaration:

```
class MyClass;

class MyClass
{
public:
	MyClass() = default;

	MyClass& operator=(const MyClass&) = default;
};

```
gives 
```
main.cpp:20:2: error: operator=() should return 'MyClass&' [misc-unconventional-assign-operator,-warnings-as-errors]
   20 | MyClass& operator=(const MyClass&) = default;
      | ^
```
https://godbolt.org/z/f136vPdfj
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to