Skip to content

[codemod] Remove virtual+override anti-pattern#9335

Closed
goldsborough wants to merge 1 commit intopytorch:masterfrom
goldsborough:virtual-override
Closed

[codemod] Remove virtual+override anti-pattern#9335
goldsborough wants to merge 1 commit intopytorch:masterfrom
goldsborough:virtual-override

Conversation

@goldsborough
Copy link
Contributor

I'm cramming through clang tidy emitted warnings. This PR addresses the hi-cpp-override check which warns that virtual + override is redundant, since override already signifies that a function is overriding and thus virtual.

Where there was virtual + override I removed the virtual, where there was virtual and no override I removed virtual and added override.

@ezyang @apaszke

@goldsborough goldsborough force-pushed the virtual-override branch 2 times, most recently from 7745f02 to c8be0d6 Compare July 11, 2018 01:22
Copy link
Contributor

@apaszke apaszke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh... fiiiiiine. I always forget that override implies virtual, but maybe it's just me 😄

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@goldsborough goldsborough force-pushed the virtual-override branch 2 times, most recently from d23205c to a5002fb Compare July 11, 2018 22:59
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@goldsborough is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@goldsborough is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Jul 13, 2018
Summary:
I'm cramming through clang tidy emitted warnings. This PR addresses the `hi-cpp-override` check which warns that `virtual` + `override` is redundant, since `override` already  signifies that a function is overriding and thus virtual.

Where there was `virtual` + `override` I removed the `virtual`, where there was `virtual` and no `override` I removed `virtual` and added `override`.

ezyang apaszke
Pull Request resolved: pytorch/pytorch#9335

Differential Revision: D8807082

Pulled By: goldsborough

fbshipit-source-id: e0a261053f6540a22cc56ec160a24aa285af6319
zdevito pushed a commit to zdevito/ATen that referenced this pull request Jul 13, 2018
Summary:
I'm cramming through clang tidy emitted warnings. This PR addresses the `hi-cpp-override` check which warns that `virtual` + `override` is redundant, since `override` already  signifies that a function is overriding and thus virtual.

Where there was `virtual` + `override` I removed the `virtual`, where there was `virtual` and no `override` I removed `virtual` and added `override`.

ezyang apaszke
Pull Request resolved: pytorch/pytorch#9335

Differential Revision: D8807082

Pulled By: goldsborough

fbshipit-source-id: e0a261053f6540a22cc56ec160a24aa285af6319
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
Summary:
I'm cramming through clang tidy emitted warnings. This PR addresses the `hi-cpp-override` check which warns that `virtual` + `override` is redundant, since `override` already  signifies that a function is overriding and thus virtual.

Where there was `virtual` + `override` I removed the `virtual`, where there was `virtual` and no `override` I removed `virtual` and added `override`.

ezyang apaszke
Pull Request resolved: pytorch#9335

Differential Revision: D8807082

Pulled By: goldsborough

fbshipit-source-id: e0a261053f6540a22cc56ec160a24aa285af6319
@ezyang ezyang added the merged label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants