未验证 提交 6d19073a 编写于 作者: G gouzil 提交者: GitHub

[clang-tidy] enable clang-analyzer-optin.cplusplus.UninitializedObject check (#56648)

上级 5cbf5bd4
......@@ -83,7 +83,7 @@ clang-analyzer-cplusplus.InnerPointer,
-clang-analyzer-nullability.NullableDereferenced,
-clang-analyzer-nullability.NullablePassedToNonnull,
-clang-analyzer-nullability.NullableReturnedFromNonnull,
-clang-analyzer-optin.cplusplus.UninitializedObject,
clang-analyzer-optin.cplusplus.UninitializedObject,
-clang-analyzer-optin.cplusplus.VirtualCall,
-clang-analyzer-optin.mpi.MPI-Checker,
-clang-analyzer-optin.osx.OSObjectCStyleCast,
......
......@@ -54,7 +54,8 @@ const char* AllocationTypeStr(AllocationType type);
/// \brief The place is used to specify where the data is stored.
class PADDLE_API Place {
public:
Place() : device(0), alloc_type_(AllocationType::UNDEFINED) {}
Place()
: device(0), alloc_type_(AllocationType::UNDEFINED), device_type_id_(0) {}
explicit Place(AllocationType type,
int8_t id,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册