Sometime in the past little while either the clang on the systems I use (Fedora) were updated to use precompiled headers by default, or else my re-install of the clang complete git plugin from github did it (the previous install was a few years old) -- I'm not sure which since I have not been doing much C++ for a few months, and now I'm busy with it again.
Note that I don't use clang for normal compiles, I use GCC. I don't believe the latter is involved because of the timestamps on the
Anyway, the precompiled
.pch headers are left in
/tmp. The problem is, regularly when checking source files I get mismatch errors in relation to the headers which are very obviously wrong in relation to the current version. The error is then followed by a message to the effect that "the current precompiled .pch is older than the header source" which persists no matter what.
Making minor edits to the header, resaving, re-running
ClangUpdateQuickFix; doesn't matter, still uses old compiled version.
Closing and reopening the header file and making changes and doing the same thing, no change.
Deleting all the
/tmp. This makes the situation worse. Now UpdateQuickFix will do absolutely nothing for the files including the header. I can add complete garbage to them and it still shows no errors.
This might be an XY problem -- I'm fine with a way that will recompile the headers when necessary. It might be more of a clang related question, but looking through their manual it only talks about enabling them on the command line and how useful they are, not how to get rid of the "feature whether you like it or not".
The only solution I've found is to shut down and restart vim, which it a complete PITA.