jbenden / vscode-c-cpp-flylint

A VS Code extension for advanced, modern, static analysis of C/C++ that supports a number of back-end analyzer programs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Having clang use Intellisense include paths

pdm-pcb opened this issue · comments

I've got a nicely functional CMake project that VSCode seems to understand fine. It compiles, debugs, etc, and Intellisense knows what's going on.

Unfortunately, clang via flylint is complaining that it can't find header files, etc. I certainly want to make use of
clang-tidy and whatnot, but I'd also like it to draw on what the editor already knows.

If flylint is already capable of this, I'd love to know how. =) Thank for all your hard work!

Same problem here. Got a JNI project, where JNI includes are fetched via find_package(JNI 1.8 REQUIRED). No issues with VS Code itself (Intellisense, CMake support, etc.), but the linters keep complaining about unknown includes (e.g. <jni.h>)

My guess is that the extension depends on the legacy CMake support, when CMake Tools Helper used to sync CMake-level stuff w/ VSCode's C/C++ config in settings.json (like include dirs, etc.)).

Now CMake Tools are natively integrated with the core C/C++ extension (settings.json is almost empty, only one line is there: "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools")

Same problem here. Clang sees the files for which the #include starts in the CMakeLists directory but not those included by #include "a.hpp" where the directory is not the CMakeLists one

Same issue. No problems compiling with cmake, finally got VSCode to recognize my paths and quit giving me intellisense errors, but was still getting flylint errors even after adding the relevant directories to "c-cpp-flylint.includePaths" in .vscode/settings.json. Disabled clang (cppcheck is still enabled) and no errors.

Same issue. No problems compiling with cmake, finally got VSCode to recognize my paths and quit giving me intellisense errors, but was still getting flylint errors even after adding the relevant directories to "c-cpp-flylint.includePaths" in .vscode/settings.json. Disabled clang (cppcheck is still enabled) and no errors.

In my machine, editing the includePaths changes nothing, but when I install the CMake Tools plugin, everything works correctly.