clion/clangd shows wrong error with ostream Follow
ostream has correctly included (no highlights) and Ctrl+click or Ctrl+b on the include or on the declaration std::ostream &os jumps ostream declaration.
that doesn't work properly in a whole project, all output operations show me this error .
for sure, project compilation does work successful as well
Please sign in to leave a comment.
the addition to post above - Ctrl+click on operator << does also jump to the declaration of this properly
Hi! What CLion version do you use? What compiler (name and version) do you use in CLion?
CLion 2019.3 EAP
Build #CL-193.3793.19, built on September 25, 2019
CLion EAP User
Expiration date: October 25, 2019
Runtime version: 11.0.4+10-b485.1 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Registry: projectView.hide.dot.idea=false, run.processes.with.pty=TRUE
target host compiler GCC531
IDE ran host: WIn10
actually , there is a number of similar errors , e.g.:
which can be successfully resolved by navigation
supposed that compiler from target host is not in use for the syntax highlight and navigation.
clangd and builtin engine is in the use?
the question is why one of them can't resolve the symbol but another one can do this
Please provide a screenshot of File | Settings | Build, Execution, Deployment | Toolchains (please capture the screenshot after the compiler detection is completed).
Also do you have all options in File | Settings | Languages & Frameworks | C/C++ | Clangd enabled?
yes, all 5 clangd checkboxes are enabled
Please do `Tools | CMake | Reset Cache and Reload Project` and after that `Tools | Resync with Remote Hosts`. Does it help?
could you clarify the logic of "resync with remote host"?
does it looks for the includes in the project? (cmakelists)
as you can see this is not a default toolchain for remote system,
and initially, resync function didn't download standard library headers until I've included this into cmakelists
(it's not required for remote build but oddly without that clion doesn't cache those to the local)
okay, I'll try to do those steps, and return back with a results, due the large project it takes 30+ minutes
I can't reply you quickly , that's terrible a few times per day:
(I'm submitting all of those)
it didn't fix the problem,
1. invalidate caches and restart
2. resync with remote
as previously it can navigate throu these operators/methods/classes but have a errors tips with highlighting
>invalidate caches and restart
Just to avoid misunderstanding, have you done `Tools | CMake | Reset Cache and Reload Project` or `File | Invalidate Caches / Restart ...`?
did both, reset cmake cache as well as IDE caches reset
so I've switched off clangd checkbox to avoid such errors (there is a lot of those, acually most of std library was),
now looks it works quicker and no error highlights