Closed guxiao-tetras closed 9 months ago
We have a couple of mechanisms to do this already:
-DNAME=VALUE
) to the commands in your compile_commands.json
file. See https://clangd.llvm.org/installation#project-setup for more details on different ways to create a compile_commands.json
file.Add the compiler flag using a clangd config file (.clangd
file in the project root directory), for example:
CompileFlags:
Add: [-DNAME=VALUE]
- -DNAME=VALUE
Thanks, it works for me.
MS intelligence has a feature, Defines, which coud set macro value in the code and control which parts of the code(in #ifdef #else #endif) is activated. This can be useful when reading only part of the code. Can you provide the same feature? Thank you.