[PATCH] D69033: [clangd] Improve symbol qualification in DefineInline code action
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 20 01:54:54 PST 2019
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp:196
// ~~~~~ -> we need to qualify Bar not x.
- if (!ND->getDeclContext()->isNamespace())
+ if (!ND->getLexicalDeclContext()->isNamespace())
return;
----------------
ilya-biryukov wrote:
> Why do we need to change this?
> My understanding is that we want semantic decl context, not the lexical one here.
oopsy, was experimenting.
================
Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp:200
+ std::string Qualifier;
+ // FIXME: Also take using directives and namespace aliases inside function
+ // body into account.
----------------
ilya-biryukov wrote:
> NIT: it looks like this FIXME belongs to the `getQualification` function itself.
I don't think so, as qualification function has no idea about the function body, right?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69033/new/
https://reviews.llvm.org/D69033
More information about the cfe-commits
mailing list