qtcreator出现代码高亮警告处理

27 阅读1分钟

新建一个项目出现以下情况

问题:

Warning: the code model could not parse an included file, which might lead to incorrect code completion and highlighting, for example.

警告:例如,代码模型无法解析包含的文件,这可能导致错误的代码完成和高亮显示

image.png

解决:关掉ClangCodeModel插件

  • 菜单栏->帮助->关于插件(P)

image.png

  • 去掉ClangCodeModel选项的勾选

image.png

  • 重启creator,警告和高亮的地方消失

image.png