[solved] Creator doesn't underline semantic errors
-
I'm not getting "Semantic errors and warnings are underlined in olive" in the editor.
In the following I'd expect
InexistentType
andinexistentMethod
to render with olive-colored underline:int main(int argc, char *argv[]) { InexistentType bla; bla.inexistentMethod(); return 0; }
Instead both words render in black with no underline. Unused variables
argc
andargv
are correctly underlined. If I add code to define the type and the method,InexistentType
turns purple whileinexistentMethod
remains black.Is this the expected behavior of Qt Creator (3.0.1, 64-bit, gcc 4.8.3, centos 7) ?
Or could I be missing some setting or package?
Looking at http://doc.qt.digia.com/qtcreator-2.4/creator-checking-code-syntax.html I can see this used to work (in version 2.4).
-
Hi and welcome to devnet,
Looks strange indeed, can you test with the latest version of Qt Creator (currently 3.4) ?
-
@SGaist @Andreas-J
here is a link to the latest documentationIt does not work in my version either Qt creator 3.1.2 on Win7 64 bit.
Actually I cannot recall to have seen such a syntax high-lighting working. -
Thanks. My colleague just tried on 3.4 and it's the same (i.e. no underline on undefined types or methods).
However, he managed to get it working with the Clang code model:
- Help -> About Plugins... -> C++ -> enable ClangCodeModel
- Tools -> Options... -> C++ -> Code Model -> C++ -> select Clang
He then gets red underline on undefined symbols.
I guess I'll just have to upgrade then.