IDE highlights most types RED (unknown typename) but finds the declaration with "go to declaration"

已回答

Hi,

For some reason, Clion highlights most types in my project red (unknown type name). However, when I use the "go to declaration" function, it finds the correct declaration of the type in the correct file. So it knows where the declaration is but somehow displays it as unknown in the use-site. If it can find where it is exactly, why would it use incorrect highlighting? The project compiles and runs fine. This seems to have regressed when I updated to 2018.2 or maybe I'm using the new version incorrectly. I'm happy to upload the project somewhere.

0

Hello!

Please do `File | Invalidate Caches / Restart...` and `Tools | CMake | Reset Cache and Reload Project` after that.

If that doesn't help, please try disabling the Show errors and warnings from clangd option in `File | Settings | Languages & Frameworks | C/C++ | Clangd`. Are the types still red with this option disabled?

0
Avatar
Permanently deleted user

Thanks Anna, disabling clangd worked!

0

Probably it's related to https://youtrack.jetbrains.com/issue/CPP-13616. Please follow the issue to get updates.

0

请先登录再写评论。