Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/64016
In order to increase the strictness of the compilation for some target depending on caffe2 we need to fix some errors uncovered when rising such flags.
This change introduces the required override tokens for virtual destructors
Test Plan: CI. Moreover targets depending on caffe2 using clang strict warnings now compile
Reviewed By: kalman5
Differential Revision:
D30541714
fbshipit-source-id:
564af31b4a9df3536d7d6f43ad29e1d0c7040551
struct TORCH_API CPUGeneratorImpl : public c10::GeneratorImpl {
// Constructors
CPUGeneratorImpl(uint64_t seed_in = default_rng_seed_val);
- ~CPUGeneratorImpl() = default;
+ ~CPUGeneratorImpl() override = default;
// CPUGeneratorImpl methods
std::shared_ptr<CPUGeneratorImpl> clone() const;
return *this;
}
- ~BuiltinOpFunction() {}
+ ~BuiltinOpFunction() override {}
private:
c10::QualifiedName name_;
StorageImpl() = delete;
StorageImpl(StorageImpl&& other) = default;
StorageImpl(const StorageImpl&) = delete;
- ~StorageImpl() = default;
+ ~StorageImpl() override = default;
void reset() {
data_ptr_.clear();
size_t size() const override;
size_t read(uint64_t pos, void* buf, size_t n, const char* what = "")
const override;
- ~IStreamAdapter();
+ ~IStreamAdapter() override;
private:
std::istream* istream_;