Issue 140236
Summary [clang-tidy] "modernize-pass-by-value" - should ignore move constructors from protected/private section
Labels clang-tidy
Assignees
Reporter denzor200
    ```
class A {
    std::string m_val;
public:
    A() = default;
    A(const A& other) = default;
    A& operator= (const A& other) = default;
protected:
 A(A&& other) = default;
    A& operator= (A&& other) = default;
};
```

This protected move constructor must be ignored, redundant warning with invalid fixit must not be provided. Also we should pay attention for friend classes.

[Full snippet](https://godbolt.org/z/oW317haY4)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to