================ @@ -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 yyyy", which is returned by asctime. const char *Result; + char TimeString[std::size("Ddd Mmm dd hh:mm:ss yyyy")]; if (getPreprocessorOpts().SourceDateEpoch) { time_t TT = *getPreprocessorOpts().SourceDateEpoch; std::tm *TM = std::gmtime(&TT); ---------------- AaronBallman wrote:
It's consistent with the behavior in `ComputeDATE_TIME`, perhaps because `SourceDateEpoch` is the number of seconds since the epoch and it's easier to reason about that from UTC as a base than localtime (e.g. for build reproducibility) 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