Enable misc clang-tidy checks (#110283)

This PR enables the misc-XX checks in clang-tidy. Meanwhile, I excluded some of them that require a lot of code changes and have no immediate benefits. Some additional fixes and suppression were also given.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110283
Approved by: https://github.com/albanD
This commit is contained in:
cyy
2023-09-30 10:39:52 +00:00
committed by PyTorch MergeBot
parent 2ead6c2f6e
commit d0ad848aa5
13 changed files with 22 additions and 7 deletions

View File

@ -216,6 +216,7 @@ PyTypeObject* _initFunctionPyTypeObject(
const char* name,
PyGetSetDef* function_properties,
PyMethodDef* function_methods) {
// NOLINTNEXTLINE(misc-redundant-expression)
type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC;
type.tp_name = name;
type.tp_basicsize = sizeof(THPCppFunction);