[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 6 01:53:41 PST 2023


kadircet added inline comments.


================
Comment at: clang/tools/include-mapping/gen_std.py:107-108
   symbols = cppreference_parser.GetSymbols(parse_pages)
-  
+  # C++ form of the C standard headers.
+  c_style_headers = {
+    "<cassert>",
----------------



================
Comment at: clang/tools/include-mapping/gen_std.py:162
                                     symbol.headers[0]))
+      # Handle C-compatibility symbols.
+      if symbol.headers[0] in c_style_headers:
----------------
what about having this logic as:
```
augmented_symbols = [symbol]
augmented_symbols.extend(GetCCompatibilitySymbols(symbol))
for s in augmented_symbols:
  ...
```

that way we can also encapsulate the rest of c-compat related logic into a more isolated place.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143214/new/

https://reviews.llvm.org/D143214



More information about the cfe-commits mailing list