diff --git a/.clang-tidy b/.clang-tidy index 518fb18aca0bd36a538f52b6786f3c757f24759f..bddfa51ab2322edacbd4a481f630fb510960896c 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -67,7 +67,7 @@ bugprone-unused-raii, -clang-analyzer-core.uninitialized.Branch, -clang-analyzer-core.uninitialized.CapturedBlockVariable, -clang-analyzer-core.uninitialized.UndefReturn, --clang-analyzer-cplusplus.InnerPointer, +clang-analyzer-cplusplus.InnerPointer, -clang-analyzer-cplusplus.Move, -clang-analyzer-cplusplus.NewDelete, -clang-analyzer-cplusplus.NewDeleteLeaks, diff --git a/paddle/phi/kernels/funcs/math_function.cc b/paddle/phi/kernels/funcs/math_function.cc index a0c506a37d86671a302ef16a659b0fb9c5653769..38ab18dca7168d35a664d00bd20cb5b94b60716f 100644 --- a/paddle/phi/kernels/funcs/math_function.cc +++ b/paddle/phi/kernels/funcs/math_function.cc @@ -277,16 +277,14 @@ struct RowwiseAdd { " Expected vector size=%d, but received %d", size, vector.numel())); - const char* in_dims_cstr = in_dims.to_str().c_str(); - const char* out_dims_cstr = out_dims.to_str().c_str(); PADDLE_ENFORCE_EQ(out_dims, in_dims, phi::errors::InvalidArgument( "The output tensor shape should be same as the input" " tensor shape. Expected output tensor shape: %s," " but received %s", - in_dims_cstr, - out_dims_cstr)); + in_dims.to_str().c_str(), + out_dims.to_str().c_str())); auto in = phi::EigenMatrix::From(input); auto vec = phi::EigenVector::Flatten(vector);