[clang] 4416e4a - [Tooling/Inclusion] Add the generic abs symbol to the table.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 24 04:56:38 PST 2023
Author: Haojian Wu
Date: 2023-02-24T13:56:00+01:00
New Revision: 4416e4a9ed0666cbeb3d34f43337d7205c09521a
URL: https://github.com/llvm/llvm-project/commit/4416e4a9ed0666cbeb3d34f43337d7205c09521a
DIFF: https://github.com/llvm/llvm-project/commit/4416e4a9ed0666cbeb3d34f43337d7205c09521a.diff
LOG: [Tooling/Inclusion] Add the generic abs symbol to the table.
Fixes https://github.com/llvm/llvm-project/issues/60964
Differential Revision: https://reviews.llvm.org/D144721
Added:
Modified:
clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
Removed:
################################################################################
diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
index 90a9aa9899fa2..692f61a45e6f4 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
@@ -233,6 +233,15 @@ SYMBOL(ssize, std::, <unordered_map>)
SYMBOL(ssize, std::, <unordered_set>)
SYMBOL(ssize, std::, <vector>)
+// Add headers for generic integer-type abs.
+// Ignore other variants (std::complex, std::valarray, std::intmax_t)
+SYMBOL(abs, std::, <cstdlib>)
+SYMBOL(abs, std::, <cmath>)
+SYMBOL(abs, None, <cstdlib>)
+SYMBOL(abs, None, <stdlib.h>)
+SYMBOL(abs, None, <cmath>)
+SYMBOL(abs, None, <math.h>)
+
// std::get has a few variants for
diff erent types (tuple, array, pair etc)
// which is tricky to disambiguate without type information.
// Don't set any header for it, as it comes with the type header.
More information about the cfe-commits
mailing list