Everything included from pch are ignored by intellisence, leading to massive indentifier is undefined errors. This is because compile_commands.json contains an “include-pch” argument to add a compiled obj file, which are ok for are actuall compiling but completely ignored by intellisence. Since i'm using clang as compiler, and intellisence for code highlight. The correct way is to use the “include” argument and add the pch source code, insted precompiled obj.
I have verified that adding the “include” of the pch source code to compile_commands.json solves the problem.
I assume that clangd suffers from the same problem. But didn't check it.
Everything included from pch are ignored by intellisence, leading to massive indentifier is undefined errors. This is because compile_commands.json contains an “include-pch” argument to add a compiled obj file, which are ok for are actuall compiling but completely ignored by intellisence. Since i'm using clang as compiler, and intellisence for code highlight. The correct way is to use the “include” argument and add the pch source code, insted precompiled obj.
I have verified that adding the “include” of the pch source code to compile_commands.json solves the problem.
I assume that clangd suffers from the same problem. But didn't check it.