[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 9 05:44:38 PST 2023
hokein 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);
----------------
kadircet wrote:
> 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?
Modified this code per the suggestion, hope it is clearer now.
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