clangd/vscode-clangd

Clangd does not see invalid "vector.emplace_back" arguments

Aokigahara23 opened this issue · 1 comments

Hello guys, thank you for the extension at first)

I have a problem with clangd / clang-tidy providing errors for this simple piece of code:

  auto *vec = new std::vector<int>(1024, 0);

  vec->push_back(1);  // ok
  vec->push_back("itsastring");  // not ok
  vec->emplace_back("itsastring");   // ok for some reason, works the same if we pass any object as argument...

System information

$ clangd --version
                                                                                                                               1 ↵
Ubuntu clangd version 14.0.0-1ubuntu1.1
Features: linux+grpc
Platform: x86_64-pc-linux-gnu

clangd extension version: v0.1.28
Operating system: Ubuntu 20.04 (WSL2)

Any solution would help, i would like clangd/clang-tidy to generate as many errors and warnings as possible for my code, i will disable them by need.