未验证 提交 98baedaf 编写于 作者: C cyberslack_lee 提交者: GitHub

[clang-tidy] NO.25 modernize-deprecated-headers(#56994)

上级 2fbebfd8
...@@ -167,7 +167,7 @@ misc-unused-alias-decls, ...@@ -167,7 +167,7 @@ misc-unused-alias-decls,
misc-unused-using-decls, misc-unused-using-decls,
modernize-avoid-bind, modernize-avoid-bind,
modernize-avoid-c-arrays, modernize-avoid-c-arrays,
-modernize-deprecated-headers, modernize-deprecated-headers,
-modernize-deprecated-ios-base-aliases, -modernize-deprecated-ios-base-aliases,
modernize-loop-convert, modernize-loop-convert,
modernize-make-shared, modernize-make-shared,
......
...@@ -14,7 +14,7 @@ limitations under the License. */ ...@@ -14,7 +14,7 @@ limitations under the License. */
#include "paddle/fluid/framework/data_feed_factory.h" #include "paddle/fluid/framework/data_feed_factory.h"
#include <stdlib.h> #include <cstdlib>
#include <memory> #include <memory>
#include <string> #include <string>
......
...@@ -14,7 +14,7 @@ limitations under the License. */ ...@@ -14,7 +14,7 @@ limitations under the License. */
#include "paddle/fluid/framework/device_worker_factory.h" #include "paddle/fluid/framework/device_worker_factory.h"
#include <stdlib.h> #include <cstdlib>
#include <memory> #include <memory>
#include <string> #include <string>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "paddle/fluid/framework/ir/mkldnn/compute_propagate_scales_mkldnn_pass.h" #include "paddle/fluid/framework/ir/mkldnn/compute_propagate_scales_mkldnn_pass.h"
#include <float.h> #include <cfloat>
#include <algorithm> #include <algorithm>
......
...@@ -14,7 +14,7 @@ limitations under the License. */ ...@@ -14,7 +14,7 @@ limitations under the License. */
#include "paddle/fluid/framework/lod_tensor.h" #include "paddle/fluid/framework/lod_tensor.h"
#include <stdint.h> #include <cstdint>
#include "paddle/fluid/framework/convert_utils.h" #include "paddle/fluid/framework/convert_utils.h"
#include "paddle/fluid/framework/version.h" #include "paddle/fluid/framework/version.h"
......
...@@ -11,7 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS, ...@@ -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. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include <time.h> #include <ctime>
#include "paddle/fluid/framework/device_worker.h" #include "paddle/fluid/framework/device_worker.h"
......
...@@ -10,7 +10,7 @@ See the License for the specific language governing permissions and ...@@ -10,7 +10,7 @@ See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#if defined(PADDLE_WITH_NCCL) || defined(PADDLE_WITH_RCCL) #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/device_worker.h"
#include "paddle/fluid/framework/executor_gc_helper.h" #include "paddle/fluid/framework/executor_gc_helper.h"
......
...@@ -14,7 +14,7 @@ limitations under the License. */ ...@@ -14,7 +14,7 @@ limitations under the License. */
#include "paddle/fluid/framework/trainer_factory.h" #include "paddle/fluid/framework/trainer_factory.h"
#include <stdlib.h> #include <cstdlib>
#include <memory> #include <memory>
#include <string> #include <string>
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
#include "paddle/fluid/imperative/data_loader.h" #include "paddle/fluid/imperative/data_loader.h"
#include <stdlib.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <unistd.h> #include <unistd.h>
#include <cstdlib>
#include <csignal> #include <csignal>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "paddle/fluid/memory/allocation/cpu_allocator.h" #include "paddle/fluid/memory/allocation/cpu_allocator.h"
#include <stdlib.h> #include <cstdlib>
#include "paddle/fluid/memory/stats.h" #include "paddle/fluid/memory/stats.h"
#include "paddle/fluid/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#include "paddle/fluid/memory/allocation/cuda_ipc_allocator.h" #include "paddle/fluid/memory/allocation/cuda_ipc_allocator.h"
#include <fcntl.h> #include <fcntl.h>
#include <stdlib.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <cstdlib>
#include <random> #include <random>
#include <string> #include <string>
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#include "paddle/fluid/memory/allocation/mmap_allocator.h" #include "paddle/fluid/memory/allocation/mmap_allocator.h"
#include <fcntl.h> #include <fcntl.h>
#include <stdlib.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <cstdlib>
#include <atomic> #include <atomic>
#include <random> #include <random>
......
...@@ -9,7 +9,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -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 See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include <math.h> #include <cmath>
#include <algorithm> #include <algorithm>
#include <string> #include <string>
......
...@@ -14,8 +14,8 @@ limitations under the License. */ ...@@ -14,8 +14,8 @@ limitations under the License. */
#include "paddle/fluid/operators/detection/mask_util.h" #include "paddle/fluid/operators/detection/mask_util.h"
#include <math.h> #include <cmath>
#include <stdlib.h> #include <cstdlib>
#include "paddle/fluid/memory/memory.h" #include "paddle/fluid/memory/memory.h"
......
...@@ -14,7 +14,7 @@ limitations under the License. */ ...@@ -14,7 +14,7 @@ limitations under the License. */
#include "paddle/fluid/operators/save_op.h" #include "paddle/fluid/operators/save_op.h"
#include <stdint.h> #include <cstdint>
#include <fstream> #include <fstream>
#include <numeric> #include <numeric>
......
...@@ -19,8 +19,8 @@ limitations under the License. */ ...@@ -19,8 +19,8 @@ limitations under the License. */
#include <arpa/inet.h> #include <arpa/inet.h>
#include <netdb.h> #include <netdb.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <stdlib.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <cstdlib>
#include <algorithm> #include <algorithm>
#include <array> #include <array>
......
...@@ -11,7 +11,7 @@ limitations under the License. */ ...@@ -11,7 +11,7 @@ limitations under the License. */
#include "paddle/fluid/platform/profiler/event_node.h" #include "paddle/fluid/platform/profiler/event_node.h"
#include <limits.h> #include <climits>
#include <algorithm> #include <algorithm>
#include <deque> #include <deque>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#include <string.h> #include <cstring>
#include <memory> #include <memory>
#include <sstream> #include <sstream>
#include <string> #include <string>
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#include <math.h>
#include <algorithm> #include <algorithm>
#include <cmath>
#include <complex> #include <complex>
#include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/backends/cpu/cpu_context.h"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "paddle/phi/kernels/trunc_kernel.h" #include "paddle/phi/kernels/trunc_kernel.h"
#include <math.h> #include <cmath>
#include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/backends/cpu/cpu_context.h"
#include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/core/kernel_registry.h"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "paddle/phi/kernels/funcs/jit/gen/adam.h" #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/backends/cpu/cpu_info.h"
#include "paddle/phi/kernels/funcs/jit/registry.h" #include "paddle/phi/kernels/funcs/jit/registry.h"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "paddle/phi/kernels/funcs/jit/gen/adamw.h" #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/backends/cpu/cpu_info.h"
#include "paddle/phi/kernels/funcs/jit/registry.h" #include "paddle/phi/kernels/funcs/jit/registry.h"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "paddle/phi/kernels/funcs/jit/gen/embseqpool.h" #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/backends/cpu/cpu_info.h"
#include "paddle/phi/kernels/funcs/jit/macro.h" #include "paddle/phi/kernels/funcs/jit/macro.h"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "paddle/phi/kernels/funcs/jit/gen/gru.h" #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/backends/cpu/cpu_info.h"
#include "paddle/phi/kernels/funcs/jit/macro.h" #include "paddle/phi/kernels/funcs/jit/macro.h"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "paddle/phi/kernels/funcs/jit/gen/lstm.h" #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/backends/cpu/cpu_info.h"
#include "paddle/phi/kernels/funcs/jit/macro.h" #include "paddle/phi/kernels/funcs/jit/macro.h"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "paddle/phi/kernels/funcs/jit/gen/matmul.h" #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/backends/cpu/cpu_info.h"
#include "paddle/phi/kernels/funcs/jit/registry.h" #include "paddle/phi/kernels/funcs/jit/registry.h"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "paddle/phi/kernels/funcs/jit/gen/sgd.h" #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/backends/cpu/cpu_info.h"
#include "paddle/phi/kernels/funcs/jit/registry.h" #include "paddle/phi/kernels/funcs/jit/registry.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册