I have a large c/c++ project containing a lot of #define macros defined in headers. VSCode "find all references" find only the definition in header file but not it usage in cpp files. I am using Visual Studio Code with Clangd extension with a remote server indexation. The arguments I am using are:
--enable-config
--header-insertion=iwyu
--header-insertion-decorators=true
--all-scope-completion
--include-cleaner-stdlib
Is there a way to for the indexation of those header containing #define ? If not can I mix clangd search in VSCode with Ctags technology which works fine with #define macros?
Example
MyHeader.hpp
#define MyVariable 3
enum Variables
{ myEnum = 3}
MyFile1.cpp
func()
{
use MyVariable;
use Variables::myEnum;
}
MyFile2.cpp
functwo()
{
use MyVariable;
use Variables::myEnum;
}
If I do the research on MyVariable on the MyHeader.hpp file, it will find only the header file whereas if I do it on myEnum it will find MyHeader.hpp, MyFile1.cpp and MyFile2.cpp