Issue |
134527
|
Summary |
Clang-Tidy should not generate fixits for bugprone-parent-virtual-call checks
|
Labels |
clang-tidy
|
Assignees |
|
Reporter |
pavelkryukov
|
Consider following example:
```c++
class A
{
public:
virtual void foo();
virtual ~A() = default;
};
class B : public A
{
public:
void foo() override;
};
class C : public B
{
public:
void foo() final;
void bar()
{
A::foo();
}
};
```
Clang-Tidy called with options `-checks=bugprone-parent-virtual-call --fix-errors` converts `C::bar()` implementation to:
```c++
void bar()
{
B::foo();
}
```
Although this check may indicate a _potential_ bug, fix-it alters the behavior a programmer intended.
I guess there should be no fix-it.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs