Reputation: 113
I have the following c++ code
struct Foo {
Foo(int x) {}
};
int main() {
int x = 42;
Foo f(x);
}
That I can compile and execute with clang++. However, if I open this code in Neovim, my LSP (clangd) recognizes f as a function rather than an object:
At first I thought this might have something to do with the most-vexing-parse, however I don't think the code has any ambiguity as it is clear that x is an integer object. Any suggestion on how I can fix the clangd parsing?
Upvotes: 1
Views: 27