I've been continually plagued with what I can only describe as CLion "freaking out" on cpp files that contain Google Mock fixtures/test. These are symptoms/steps to reproduce:
1. Have a CPP file with GMock tests in it. Everything is happy and compiles
2. Make some kind of a change. I think it usually has to do with changing something about the test fixture
3. CLion "freaks out" and now basically says that every line in the file has an error. It no longer recognizes any of the GMock macros, nor does it recognize the members of my test fixture. Note that everything compiles fine when I run my build (using CMake).
4. Run Tools | CMake | Reload CMake project
5. Wait 3-4 minutes for the project to reload (this is the most awesome part!)
6. Everything is fine now.
Is this a known issue? If not I'll try to make a self-contained example.