0

I am configuring clangd(clangd-12) on vscode(wsl) using config.yaml

Diagnostics:
  ClangTidy:
    Add:
      [
        performance-*,
        bugprone-*,
        portability-*,
        modernize-*,
      ]
    Remove: modernize-use-trailing-return-type
    CheckOptions:
      WarnOnFloatingPointNarrowingConversion: false

Here is my config.yaml , but when i write a class like this

#ifndef __MODEL_H__
#define __MODEL_H__

#include <vector>
#include "geometry.h"

class Model
{
private:
    std::vector<Vec3f> verts_;             //顶点
    std::vector<std::vector<int> > faces_; //面片

public:
    explicit Model(const char *filename);
    ~Model();
    int GetVertsSize();
    int GetFacesSize();
    int test();// this is an unimplemented function
    Vec3f GetVertByIndex(int i);
    std::vector<int> GetFaceByIndex(int idx);
};

#endif //__MODEL_H__

As you can see here, test() is an unimplemented member function , but no warnings or errors showd by clangd , and when i use it in main.cpp, i get a complication error;

i just want to know how to configure config.yaml to make it work

Rémi
  • 525
  • 1
  • 15
  • 26
cooronx
  • 1
  • 1
  • I don't think you can use clang-tidy for that. It analyses single file. But C++ extension for VSCode does that by default I believe? It should show you dots under the method and report a problem in Problem tab – Yksisarvinen Aug 25 '23 at 16:14
  • i add this C++ extension in wsl,but it seems not work – cooronx Aug 25 '23 at 16:31
  • i mean default C++ extension seems have confilict with clangd – cooronx Aug 25 '23 at 16:33
  • Is a diagnostic about an unimplemented member function something you've seen clang-tidy produce before, for example when using it from the command line? – HighCommander4 Aug 27 '23 at 03:22

0 Answers0