[clang] [include-cleaner] Support multi-header symbols in mapping generator (PR #147720)
kadir çetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 4 01:24:20 PDT 2025
================
@@ -497,354 +78,3 @@ SYMBOL(_26, std::placeholders::, <functional>)
SYMBOL(_27, std::placeholders::, <functional>)
SYMBOL(_28, std::placeholders::, <functional>)
SYMBOL(_29, std::placeholders::, <functional>)
-
-// Macros
-SYMBOL(NULL, None, <cstddef>)
-SYMBOL(NULL, None, <stddef.h>)
-SYMBOL(NULL, None, <cstdlib>)
-SYMBOL(NULL, None, <stdlib.h>)
-SYMBOL(NULL, None, <cstring>)
-SYMBOL(NULL, None, <string.h>)
-SYMBOL(NULL, None, <cwchar>)
-SYMBOL(NULL, None, <wchar.h>)
-SYMBOL(NULL, None, <ctime>)
-SYMBOL(NULL, None, <time.h>)
-SYMBOL(NULL, None, <clocale>)
-SYMBOL(NULL, None, <locale.h>)
-SYMBOL(NULL, None, <cstdio>)
-SYMBOL(NULL, None, <stdio.h>)
----------------
kadircet wrote:
thanks a lot for bringing this up, i totally missed this.
it's not just NULL, but also:
- `begin`, `cbegin`, `cend`, `crbegin`, `crend`, `data`, `empty`, `end`, `rbegin`, `rend`, `size`, `ssize` -> should prefer `iterator`
- `hash` -> should prefer `functional`
- `swap` -> should prefer `utility`
- `tuple_size` -> should prefer `tuple`
hopefully changes in the ordering here will be more obvious for smaller changes. but we should pay some extra attention this time.
@cseriildi I think best course of action is filing bugs (or making these changes ourselves) to cppreference to ensure convergence going forward as @itislu also mentioned. but in the meanwhile we should have a way to unblock ourselves, wdyt about having a list of `(namespace, symbol) -> (preffered_header)` mappings to override ordering for these symbols?
https://github.com/llvm/llvm-project/pull/147720
More information about the cfe-commits
mailing list