Skip to content

Commit

Permalink
[clang-tidy] NO.25 modernize-deprecated-headers(#56994)
Browse files Browse the repository at this point in the history
  • Loading branch information
enkilee authored Sep 7, 2023
1 parent 2fbebfd commit 98baeda
Show file tree
Hide file tree
Showing 27 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ misc-unused-alias-decls,
misc-unused-using-decls,
modernize-avoid-bind,
modernize-avoid-c-arrays,
-modernize-deprecated-headers,
modernize-deprecated-headers,
-modernize-deprecated-ios-base-aliases,
modernize-loop-convert,
modernize-make-shared,
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/data_feed_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ limitations under the License. */

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

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

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

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

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

#include <memory>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "paddle/fluid/framework/ir/mkldnn/compute_propagate_scales_mkldnn_pass.h"

#include <float.h>
#include <cfloat>

#include <algorithm>

Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/lod_tensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ limitations under the License. */

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

#include <stdint.h>
#include <cstdint>

#include "paddle/fluid/framework/convert_utils.h"
#include "paddle/fluid/framework/version.h"
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/pull_dense_worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
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 "paddle/fluid/framework/device_worker.h"

Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/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_NCCL) || defined(PADDLE_WITH_RCCL)
#include <float.h>
#include <cfloat>

#include "paddle/fluid/framework/device_worker.h"
#include "paddle/fluid/framework/executor_gc_helper.h"
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/trainer_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ limitations under the License. */

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

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

#include <memory>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/imperative/data_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

#include "paddle/fluid/imperative/data_loader.h"

#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
#include <cstdlib>

#include <csignal>

Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/memory/allocation/cpu_allocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "paddle/fluid/memory/allocation/cpu_allocator.h"

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

#include "paddle/fluid/memory/stats.h"
#include "paddle/fluid/platform/enforce.h"
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/memory/allocation/cuda_ipc_allocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include "paddle/fluid/memory/allocation/cuda_ipc_allocator.h"

#include <fcntl.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <cstdlib>

#include <random>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/memory/allocation/mmap_allocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include "paddle/fluid/memory/allocation/mmap_allocator.h"

#include <fcntl.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <cstdlib>

#include <atomic>
#include <random>
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/fluid/operators/detection/mask_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ limitations under the License. */

#include "paddle/fluid/operators/detection/mask_util.h"

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

#include "paddle/fluid/memory/memory.h"

Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/operators/save_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ limitations under the License. */

#include "paddle/fluid/operators/save_op.h"

#include <stdint.h>
#include <cstdint>

#include <fstream>
#include <numeric>
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/platform/gen_comm_id_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ limitations under the License. */
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <cstdlib>

#include <algorithm>
#include <array>
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/platform/profiler/event_node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ limitations under the License. */

#include "paddle/fluid/platform/profiler/event_node.h"

#include <limits.h>
#include <climits>

#include <algorithm>
#include <deque>
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/prim/api/manual_prim/static_prim_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <string.h>
#include <cstring>
#include <memory>
#include <sstream>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/cpu/lstsq_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

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

#include "paddle/phi/backends/cpu/cpu_context.h"
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/cpu/trunc_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "paddle/phi/kernels/trunc_kernel.h"

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

#include "paddle/phi/backends/cpu/cpu_context.h"
#include "paddle/phi/core/kernel_registry.h"
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/funcs/jit/gen/adam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "paddle/phi/kernels/funcs/jit/gen/adam.h"

#include <stddef.h> // offsetof
#include <cstddef> // offsetof

#include "paddle/phi/backends/cpu/cpu_info.h"
#include "paddle/phi/kernels/funcs/jit/registry.h"
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/funcs/jit/gen/adamw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "paddle/phi/kernels/funcs/jit/gen/adamw.h"

#include <stddef.h> // offsetof
#include <cstddef> // offsetof

#include "paddle/phi/backends/cpu/cpu_info.h"
#include "paddle/phi/kernels/funcs/jit/registry.h"
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/funcs/jit/gen/embseqpool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "paddle/phi/kernels/funcs/jit/gen/embseqpool.h"

#include <stddef.h> // offsetof
#include <cstddef> // offsetof

#include "paddle/phi/backends/cpu/cpu_info.h"
#include "paddle/phi/kernels/funcs/jit/macro.h"
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/funcs/jit/gen/gru.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "paddle/phi/kernels/funcs/jit/gen/gru.h"

#include <stddef.h> // offsetof
#include <cstddef> // offsetof

#include "paddle/phi/backends/cpu/cpu_info.h"
#include "paddle/phi/kernels/funcs/jit/macro.h"
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/funcs/jit/gen/lstm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "paddle/phi/kernels/funcs/jit/gen/lstm.h"

#include <stddef.h> // offsetof
#include <cstddef> // offsetof

#include "paddle/phi/backends/cpu/cpu_info.h"
#include "paddle/phi/kernels/funcs/jit/macro.h"
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/funcs/jit/gen/matmul.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "paddle/phi/kernels/funcs/jit/gen/matmul.h"

#include <stddef.h> // offsetof
#include <cstddef> // offsetof

#include "paddle/phi/backends/cpu/cpu_info.h"
#include "paddle/phi/kernels/funcs/jit/registry.h"
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/funcs/jit/gen/sgd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "paddle/phi/kernels/funcs/jit/gen/sgd.h"

#include <stddef.h> // offsetof
#include <cstddef> // offsetof

#include "paddle/phi/backends/cpu/cpu_info.h"
#include "paddle/phi/kernels/funcs/jit/registry.h"
Expand Down

0 comments on commit 98baeda

Please sign in to comment.