<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/98724>98724</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang/lib/Lex/PPMacroExpansion.cpp: 2 * calls to obsolete function asctime
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang,
code-quality
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dcb314
</td>
</tr>
</table>
<pre>
Static analyser cppcheck says:
1.
trunk/clang/lib/Lex/PPMacroExpansion.cpp:1728:16: style: Obsolete function 'asctime' called. It is recommended to use 'strftime' instead. [asctimeCalled]
Source code is
Result = asctime(TM);
2.
trunk/clang/lib/Lex/PPMacroExpansion.cpp:1738:18: style: Obsolete function 'asctime' called. It is recommended to use 'strftime' instead. [asctimeCalled]
Source code is
Result = asctime(TM);
But "man asctime" says:
Marked obsolete in POSIX.1-2008 (recommending strftime(3)).
2008 is 16 years ago.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUU8Fum0AQ_ZrhMjKCWTBw4GDHRYrUKFHTQ6_LMsbbLCzdXaL47yuok7hqD616KgeGgccb3puH9F73I3MN-R7yQyTncLKu7lQr0ixqbXeuH4MMWqEcpTl7dqimSZ1YPaGXZw9iB8kBkss5ja-74ObxCahRRo49UGN0C9R85Beg5uHhTipnP7xMcvTajrGaJhC7tKByKVsQO_ThbHi5uG-9NRwYj_OogrYjAhXSq6AHBipQSWO4i_E2oPboWNlh4LHjDoPF2fMC98EdX_F69IFlFyPk-wvNzUoB-eFawKOdnWJUtmPU_voJLscn9rMJCOKAbx9Tfr4DqkDsr9H077aI1Zbyf7Dlz33ZzwGBaJDjO5B-l6uF9U66J-7QvorWIz7cP95-idMNJUmJQOWbRD32-K6sFMtoqn7awvqO9phu8czSeZS9vQCirhZdJSoZcZ0WlJR5JVIRneqc2kxyklUyK_NtmaUqbVXBvFWUZ12ZRbqmhLKkSEVSUilE3FYqLWiby0odjzLPIUt4kNrExjwPsXV9pL2fua7KgrLIyJaNX_9Foks8COhm6WzHm2-zNDqcl5v5IXL1QrJp595Dlhjtg3-nDToYrv8iYkgItFsz45d82F_CdVlRNDtTn0KY1iVRA9T0OpzmNlZ2WGaZ59eymZz9yioANatMD9T8UPpc0_cAAAD__4Y4Xu8">