Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling virtual function in ctor #4030

Closed
JaySon-Huang opened this issue Feb 14, 2022 · 0 comments · Fixed by #4022
Closed

Calling virtual function in ctor #4030

JaySon-Huang opened this issue Feb 14, 2022 · 0 comments · Fixed by #4022
Labels

Comments

@JaySon-Huang
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Run clang-tidy on codes, it throw errors on calling virtual function in ctor. https://stackoverflow.com/questions/962132/calling-virtual-functions-inside-constructors

 /build/tics/dbms/src/Storages/DeltaMerge/DMSegmentThreadInputStream.h:47:35: error: Call to virtual method 'DMSegmentThreadInputStream::getName' during construction bypasses virtual dispatch [clang-analyzer-optin.cplusplus.VirtualCall,-warnings-as-errors]
         , log(getMPPTaskLog(log_, getName()))

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiFlash version? (Required)

master, 5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants