Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clang-tidy] NO.13 modernize-deprecated-headers #61721

Merged
merged 3 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions paddle/common/flags_native.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#include "paddle/common/flags.h"

#include <assert.h>
#include <stdlib.h>
#include <cassert>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <map>
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/heter_section_worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ See the License for the specific language governing permissions and
limitations under the License. */

#if defined(PADDLE_WITH_PSCORE)
#include <float.h>
#include <cfloat>

#include "paddle/fluid/distributed/ps/service/heter_server.h"
#include "paddle/fluid/framework/convert_utils.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

#include <math.h>
#include <cmath>

#include <algorithm>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions paddle/phi/core/distributed/store/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include <sys/socket.h>
#include <unistd.h>
#endif
#include <errno.h>
#include <stdio.h>
#include <cerrno>
#include <cstdio>

namespace phi {
namespace distributed {
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/infermeta/spmd_rules/dim_trans.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */

#include "paddle/phi/infermeta/spmd_rules/dim_trans.h"
#include <assert.h>
#include <cassert>
#include <cstdio>
#include <numeric>
#include <set>
Expand Down
10 changes: 5 additions & 5 deletions paddle/phi/kernels/fusion/cpu/self_dp_attention_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <assert.h>
#include <immintrin.h>
#include <math.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <new>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions paddle/utils/string/string_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#include "paddle/utils/string/string_helper.h"

#include <ctype.h>
#include <stdio.h>
#include <cctype>
#include <cstdio>

#include <cstring>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/fluid/framework/selected_rows_utils_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ limitations under the License. */

#include "paddle/fluid/framework/selected_rows_utils.h"

#include <time.h>
#include <ctime>

#include <thread> // NOLINT

Expand Down
4 changes: 2 additions & 2 deletions test/cpp/fluid/pscore/heter_listen_and_server_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

#include <stdlib.h>
#include <gtest/gtest.h>
#include <unistd.h>
#include <cstdlib>

#include <gtest/gtest.h>
#include <random>
#include <sstream>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/fluid/pscore/heter_server_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ limitations under the License. */

#include "paddle/fluid/distributed/ps/service/heter_server.h"

#include <stdlib.h>
#include <cstdlib>

#include <memory>
#include <random>
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/fluid/pscore/send_and_recv_op_cpu_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */

#if defined PADDLE_WITH_PSCORE
#include <stdlib.h>
#include <cstdlib>

#include <memory>
#include <random>
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/fluid/pscore/send_and_recv_op_gpu_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ limitations under the License. */

#if (defined PADDLE_WITH_CUDA) && (defined PADDLE_WITH_PSCORE)

#include <stdlib.h>
#include <cstdlib>

#include <memory>
#include <random>
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/fluid/pscore/switch_server_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */

#if defined PADDLE_WITH_PSCORE
#include <stdlib.h>
#include <cstdlib>

#include <memory>
#include <random>
Expand Down
6 changes: 3 additions & 3 deletions test/cpp/inference/api/analyzer_capi_exp_gpu_tester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ limitations under the License. */

#include <glog/logging.h>
#include <gtest/gtest.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <cstddef>
#include <cstdint>
#include <cstdio>

#include <string>
#include <vector>
Expand Down
6 changes: 3 additions & 3 deletions test/cpp/inference/api/analyzer_capi_exp_int_tester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ limitations under the License. */

#include <glog/logging.h>
#include <gtest/gtest.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <cstddef>
#include <cstdint>
#include <cstdio>

#include <string>
#include <vector>
Expand Down
6 changes: 3 additions & 3 deletions test/cpp/inference/api/analyzer_capi_exp_ner_tester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

#include <glog/logging.h>
#include <gtest/gtest.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <cstddef>
#include <cstdint>
#include <cstdio>

#include <string>
#include <vector>
Expand Down
6 changes: 3 additions & 3 deletions test/cpp/inference/api/analyzer_capi_exp_pd_config_tester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ limitations under the License. */

#include <glog/logging.h>
#include <gtest/gtest.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <cstddef>
#include <cstdint>
#include <cstdio>

#include <string>
#include <vector>
Expand Down
6 changes: 3 additions & 3 deletions test/cpp/inference/api/analyzer_capi_exp_pd_tensor_tester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ limitations under the License. */

#include <glog/logging.h>
#include <gtest/gtest.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <cstddef>
#include <cstdint>
#include <cstdio>

#include <fstream>
#include <iostream>
Expand Down
6 changes: 3 additions & 3 deletions test/cpp/inference/api/analyzer_capi_exp_pd_threads_tester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ limitations under the License. */

#include <glog/logging.h>
#include <gtest/gtest.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <cstddef>
#include <cstdint>
#include <cstdio>

#include <fstream>
#include <iostream>
Expand Down
6 changes: 3 additions & 3 deletions test/cpp/inference/api/analyzer_capi_exp_xpu_tester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ limitations under the License. */

#include <glog/logging.h>
#include <gtest/gtest.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <cstddef>
#include <cstdint>
#include <cstdio>

#include <string>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/phi/core/test_selected_rows.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

#include <time.h>
#include <ctime>

#include <thread> // NOLINT

Expand Down
2 changes: 1 addition & 1 deletion test/cpp/utils/flags_native_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "paddle/common/flags.h"

#include <stdlib.h>
#include <cstdlib>
#include "gtest/gtest.h"

PD_DEFINE_int32(paddle_test_int32, 1, "test int32 flag");
Expand Down