This looks like VisualGDB mistakenly assumes that those files belong to a VisualGDB-managed project. Please try the following:
Close your solution.
Clear the Clang diagnostic log.
Reopen the solution and open one source file. Ensure the problem persists.
Post the entire Clang log here. It should explain what projects are considered open by the IntelliSense and why it attaches to your files.
Also as a quick workaround while diagnosing this you can change the default engine on the Clang IntelliSense Diagnostic Console to “VS IntelliSense” while not working with VisualGDB projects. This should prevent it from attaching to the files unless the project referencing them explicitly enables Clang IntelliSense via settings.
I fell in this “old” topic by searching on google about a very simlar problem with CLang + VS2017 + VisualGDB.
Actually, I found that Clang Diagnostics Console shows problems with .c modules recently added to a project, or where we add some new includes. If we close the solution and reopen to try to fix IntelliSense, this will continue to give a failure until we close all open files of the solution: it seems like Clang fails to reparse modules that are automatically opened when we open the solution (VS remembers the last modules opened before we close a solution).
So, if sometimes I still encounter the failure of IntelliSense, I do following steps:
close all open modules and files of the solution (right click on a file tab, and select “close all documents”
close the solution
reopen the solution, verifying that no document is automatically opened by VS
check the Clang Intellisense Diagnostic Console that wil no more show problems on modules parsing