[PATCH] D47223: [clangd] Handle enumerators in named, unscoped enums similarly to scoped enums
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 23 03:01:55 PDT 2018
ilya-biryukov added a subscriber: sammccall.
ilya-biryukov added a comment.
I'm not sure if we have tests for that, but I remember that we kept the enumerators in the outer scope so that completion could find them..
Am I right that this patch will change the behavior and we won't get enumerators in the following example:
/// foo.h
enum Foo {
A, B, C
};
/// foo.cpp
#include "foo.h"
int a = ^ // <-- A, B, C should be in completion list here.
It's one of those cases where code completion and workspace symbol search seem to want different results :-(
I suggest to add an extra string field for containing unscoped enum name, maybe into symbol details? And add a parameter to `Index::fuzzyFind` on whether we need to match enum scopes or not.
+ at ioeric, + at sammccall, WDYT?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47223
More information about the cfe-commits
mailing list