Skip to content

Commit 51ee937

Browse files
gouzilBeingGod
authored andcommitted
[clang-tidy] enable clang-analyzer-optin.cplusplus.UninitializedObject check (PaddlePaddle#56648)
1 parent 5564891 commit 51ee937

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.clang-tidy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ clang-analyzer-cplusplus.InnerPointer,
8383
-clang-analyzer-nullability.NullableDereferenced,
8484
-clang-analyzer-nullability.NullablePassedToNonnull,
8585
-clang-analyzer-nullability.NullableReturnedFromNonnull,
86-
-clang-analyzer-optin.cplusplus.UninitializedObject,
86+
clang-analyzer-optin.cplusplus.UninitializedObject,
8787
-clang-analyzer-optin.cplusplus.VirtualCall,
8888
-clang-analyzer-optin.mpi.MPI-Checker,
8989
-clang-analyzer-optin.osx.OSObjectCStyleCast,

paddle/phi/common/place.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ const char* AllocationTypeStr(AllocationType type);
5454
/// \brief The place is used to specify where the data is stored.
5555
class PADDLE_API Place {
5656
public:
57-
Place() : device(0), alloc_type_(AllocationType::UNDEFINED) {}
57+
Place()
58+
: device(0), alloc_type_(AllocationType::UNDEFINED), device_type_id_(0) {}
5859

5960
explicit Place(AllocationType type,
6061
int8_t id,

0 commit comments

Comments
 (0)