When offering code-completion suggestions, the generated code will now take
into account any namespaces explicitly qualified with a using-directive
BUG: 373722
KDevelop |
When offering code-completion suggestions, the generated code will now take
into account any namespaces explicitly qualified with a using-directive
BUG: 373722
The test_codecompletion tests are broken (as confirmed on IRC),
but an individual test case can be run before the crash
$ ./test_codecompletion testImplement:bug373722-using-directive
No Linters Available |
No Unit Test Coverage |
Buildable 3432 | |
Build 3450: arc lint + arc unit |
Added a test.
But, as I've mentioned before, the tests for code completion crash,
So I haven't been able to run all tests, though you can run a single test case
before it crashes.
There's another thing, the visitor will keep scanning even past the invocation
point, even though function declarations (and using-directives) after the
invocation point shouldn't be considered while making suggestions. Would it
better to create a new patch and test the file/line to break the visitor ?
The simple example
namespace A { void foo(); } using namespace A; void foo() { std::cout << "foo" << std::endl; }
Doesn't work, because the function definition doesn't implement ::A::foo but ::foo. Although it would work in some other cases... I figure it's not worth supporting.