CLion shows <no context> when a custom compiler is used; code insight features don't work
Problem
In some cases, when the Custom Compiler feature is used, CLion can't detect a resolve context for project source files, showing Context | <no context> in the C/C++ Resolve Context widget on the Status bar.
As a result, in such source files, code insight features might not work, includes might be marked as "not found", symbols and types might not be resolved, etc.
Resolution
Try adding the C/C++ standard to the defines or defines-text section in your .yaml file with the compiler description.
For example, to specify the C99 standard, you can add __STDC_VERSION__: 199901L to the defines section of the .yaml file.
After saving this change, invalidate all caches and restart CLion: go to File | Invalidate Caches…, select all options, then click Invalidate and Restart.
Please sign in to leave a comment.