================
@@ -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 yyyy", which is returned by asctime.
-    const char *Result;
+    std::string Result = "??? ??? ?? ??:??:?? ????";
+    std::stringstream TmpStream;
+    TmpStream.imbue(std::locale("C"));
+    TmpStream.setstate(std::ios_base::badbit);
----------------
yichi170 wrote:

Fixed it. Thanks for the advice.

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

Reply via email to