[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-23 Thread Yi-Chi Lee via cfe-commits
https://github.com/yichi170 updated https://github.com/llvm/llvm-project/pull/99075 >From 0fcbd4a46bb05ad9829fcf33a9829fd5f5269c71 Mon Sep 17 00:00:00 2001 From: yichi170 Date: Wed, 17 Jul 2024 02:15:43 +0800 Subject: [PATCH 1/4] [clang] replaced the usage of `asctime` with `strftime` --- cla

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-23 Thread Yi-Chi Lee via cfe-commits
@@ -1721,11 +1723,15 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { Diag(Tok.getLocation(), diag::warn_pp_date_time); // MSVC, ICC, GCC, VisualAge C++ extension. The generated string should be // of the form "Ddd Mmm dd hh::mm::ss ", which is returned b

[clang] [clang] replaced the usage of `asctime` with `std::put_time` (PR #99075)

2024-07-23 Thread Yi-Chi Lee via cfe-commits
https://github.com/yichi170 edited https://github.com/llvm/llvm-project/pull/99075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] replaced the usage of `asctime` with `std::put_time` (PR #99075)

2024-07-23 Thread Yi-Chi Lee via cfe-commits
https://github.com/yichi170 edited https://github.com/llvm/llvm-project/pull/99075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] replaced the usage of `asctime` with `std::put_time` (PR #99075)

2024-07-23 Thread Yi-Chi Lee via cfe-commits
yichi170 wrote: I don't have write access, so if the PR is ready, please help me land it! If there is anything that I need to do, please let me know! https://github.com/llvm/llvm-project/pull/99075 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [clang] replaced the usage of `asctime` with `std::put_time` (PR #99075)

2024-07-23 Thread Yi-Chi Lee via cfe-commits
https://github.com/yichi170 updated https://github.com/llvm/llvm-project/pull/99075 >From 60a8a36851bcb0e73228ec4941f1906d0e5b7ba9 Mon Sep 17 00:00:00 2001 From: yichi170 Date: Wed, 17 Jul 2024 02:15:43 +0800 Subject: [PATCH] [clang] replaced the usage of `asctime` with `std::put_time` --- cl

[clang] [clang] replaced the usage of `asctime` with `std::put_time` (PR #99075)

2024-07-25 Thread Yi-Chi Lee via cfe-commits
yichi170 wrote: Thanks for identifying the problem. @AaronBallman @rorth https://github.com/llvm/llvm-project/pull/99075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-16 Thread Yi-Chi Lee via cfe-commits
https://github.com/yichi170 created https://github.com/llvm/llvm-project/pull/99075 In `clang/lib/Lex/PPMacroExpansion.cpp`, replaced the usage of the obsolete `asctime` function with `strftime` for generating timestamp strings. This is my first time contributing to an open-source project. If

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-16 Thread Yi-Chi Lee via cfe-commits
@@ -1722,10 +1722,12 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // MSVC, ICC, GCC, VisualAge C++ extension. The generated string should be // of the form "Ddd Mmm dd hh::mm::ss ", which is returned by asctime. const char *Result; +char TimeStrin

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-16 Thread Yi-Chi Lee via cfe-commits
https://github.com/yichi170 edited https://github.com/llvm/llvm-project/pull/99075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-17 Thread Yi-Chi Lee via cfe-commits
https://github.com/yichi170 updated https://github.com/llvm/llvm-project/pull/99075 >From 0fcbd4a46bb05ad9829fcf33a9829fd5f5269c71 Mon Sep 17 00:00:00 2001 From: yichi170 Date: Wed, 17 Jul 2024 02:15:43 +0800 Subject: [PATCH 1/2] [clang] replaced the usage of `asctime` with `strftime` --- cla

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-17 Thread Yi-Chi Lee via cfe-commits
yichi170 wrote: I submitted a commit that used the original way with error handling and fixed-sized TimeString. > (an alternative would be to use the C++ interface > https://compiler-explorer.com/z/WEqTW341b ) Since I'm not familiar with the issue related to locale, I'm not sure which method

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-17 Thread Yi-Chi Lee via cfe-commits
@@ -1721,11 +1721,13 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { Diag(Tok.getLocation(), diag::warn_pp_date_time); // MSVC, ICC, GCC, VisualAge C++ extension. The generated string should be // of the form "Ddd Mmm dd hh::mm::ss ", which is returned b

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-21 Thread Yi-Chi Lee via cfe-commits
@@ -1721,11 +1721,13 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { Diag(Tok.getLocation(), diag::warn_pp_date_time); // MSVC, ICC, GCC, VisualAge C++ extension. The generated string should be // of the form "Ddd Mmm dd hh::mm::ss ", which is returned b

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-21 Thread Yi-Chi Lee via cfe-commits
https://github.com/yichi170 edited https://github.com/llvm/llvm-project/pull/99075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits