[PATCH] D50189: Fully qualify the renamed symbol if the shortened name is ambiguous.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 2 09:06:32 PDT 2018
ilya-biryukov added inline comments.
================
Comment at: lib/Tooling/Core/Lookup.cpp:137
+ StringRef TrimmedQName = QName.substr(2);
+ for (auto I = UseNamespaces.begin(), E = UseNamespaces.end(); I != E; ++I) {
+ const NamespaceDecl *NS = *I;
----------------
maybe use range-based-for here? I.e. `for (const NamespaceDecl* NS : UseNamespaces) { ... }`
================
Comment at: lib/Tooling/Core/Lookup.cpp:139
+ const NamespaceDecl *NS = *I;
+ auto LookupRes = NS->lookup(DeclarationName(&AST.Idents.get(Head)));
+ if (!LookupRes.empty()) {
----------------
This will not take using namespaces into account, right? Do we care about those or is this a known limitation of the tools?
Repository:
rC Clang
https://reviews.llvm.org/D50189
More information about the cfe-commits
mailing list