Revert "[2/N] Fix clang-tidy readability checks (#164652)"

This reverts commit 3c5ca685d6f5b6f3971c0cd20a054aa355610419.

Reverted https://github.com/pytorch/pytorch/pull/164652 on behalf of https://github.com/izaitsevfb due to need to revert due to a conflict with revert of https://github.com/pytorch/pytorch/pull/162659 ([comment](https://github.com/pytorch/pytorch/pull/164652#issuecomment-3369346707))
This commit is contained in:
PyTorch MergeBot
2025-10-05 21:36:57 +00:00
parent 5d7360bb03
commit 2c5ed6e7c0
89 changed files with 199 additions and 142 deletions

View File

@ -182,7 +182,7 @@ class OptionalDeviceGuard {
}
private:
impl::InlineOptionalDeviceGuard<impl::VirtualGuardImpl> guard_;
impl::InlineOptionalDeviceGuard<impl::VirtualGuardImpl> guard_{};
};
// Note [Whither the DeviceGuard boilerplate]

View File

@ -143,7 +143,7 @@ struct OptionalStreamGuard {
}
private:
c10::impl::InlineOptionalStreamGuard<impl::VirtualGuardImpl> guard_;
c10::impl::InlineOptionalStreamGuard<impl::VirtualGuardImpl> guard_{};
};
/**

View File

@ -33,7 +33,6 @@ C10_DECLARE_REGISTRY(
// Get the global PyInterpreter hooks instance
C10_API const PyInterpreterHooksInterface& getPyInterpreterHooks();
// Helper function to get the global interpreter
C10_API PyInterpreter* getGlobalPyInterpreter();
} // namespace c10::impl

View File

@ -14,6 +14,9 @@ using GetPyInterpreterFn = PyInterpreter* (*)();
// Global function pointer (set by csrc initialization)
C10_API extern GetPyInterpreterFn g_get_pyinterpreter_fn;
// Helper function to get the global interpreter
C10_API PyInterpreter* getGlobalPyInterpreter();
struct C10_API PyObjectSlot {
public:
PyObjectSlot();

View File

@ -137,7 +137,7 @@ struct TraceEntry {
size_t size_;
MempoolId_t mempool_;
trace_time_ time_{};
std::string compile_context_;
std::string compile_context_{};
};
// Calls made by record_function will save annotations