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

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 9 04:50:27 PST 2023


kadircet added inline comments.


================
Comment at: clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp:218
+  if (!D) // global scope.
+    return getMappingPerLang(L)->NamespaceSymbols->lookup("");
   auto It = NamespaceCache.find(D);
----------------
oh i actually missed the behaviour change here in the previous version of the code and it seems very subtle.
can we change this function to take in a `DeclContext*` instead and terminate traversal inside the callsite at `TUDecl` and only treat `TUDecl` as global scope here?


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