Skip to content

Commit d9dc4b2

Browse files
soulitzerpytorchmergebot
authored andcommitted
[BE] Add missing override to remove build warning spam (pytorch#107191)
``` In file included from /local/pytorch3/test/cpp/api/optim.cpp:7: local/pytorch3/test/cpp/api/support.h:44:3: warning: '~WarningCapture' overrides a destructor but is not marked 'override' [-Winconsistent-missing-destructor-override] ~WarningCapture() { ^ local/pytorch3/c10/util/Exception.h:167:11: note: overridden virtual function is here virtual ~WarningHandler() = default; ``` Pull Request resolved: pytorch#107191 Approved by: https://github.com/janeyx99
1 parent 8c44cfe commit d9dc4b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/cpp/api/support.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct WarningCapture : public WarningHandler {
4141
WarningUtils::set_warning_handler(this);
4242
}
4343

44-
~WarningCapture() {
44+
~WarningCapture() override {
4545
WarningUtils::set_warning_handler(prev_);
4646
}
4747

0 commit comments

Comments
 (0)