[clang] [tooling/include-mapping] Add missing localtime_r symbols (PR #66091)

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 12 07:22:51 PDT 2023


https://github.com/hokein created https://github.com/llvm/llvm-project/pull/66091:

Fixes https://github.com/llvm/llvm-project/issues/64587.

>From a9147bd3746eb1ac944c0e2c2350fb533957475b Mon Sep 17 00:00:00 2001
From: Haojian Wu <hokein.wu at gmail.com>
Date: Tue, 12 Sep 2023 16:20:24 +0200
Subject: [PATCH] [tooling/include-mapping] Add missing localtime_r symbols to
 the mapping.

Fixes https://github.com/llvm/llvm-project/issues/64587.
---
 .../Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc  | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
index 165c1fc2eebc2c3..0d351d688a3296c 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
@@ -367,6 +367,16 @@ SYMBOL(any_cast, std::, <any>)
 SYMBOL(div, std::, <cstdlib>)
 SYMBOL(abort, std::, <cstdlib>)
 
+// These are C symbols that are not under std namespace.
+SYMBOL(localtime_r, None, <ctime>)
+SYMBOL(localtime_r, None, <time.h>)
+SYMBOL(localtime_s, None, <ctime>)
+SYMBOL(localtime_s, None, <time.h>)
+SYMBOL(gmtime_r, None, <ctime>)
+SYMBOL(gmtime_r, None, <time.h>)
+SYMBOL(gmtime_s, None, <ctime>)
+SYMBOL(gmtime_s, None, <time.h>)
+
 // The std::placeholder symbols (_1, ..., _N) are listed in the cppreference
 // placeholder.html, but the index only contains a single entry with "_1, _2, ..., _N"
 // text, which are not handled by the script.



More information about the cfe-commits mailing list