[Qt-creator] Where to find more information from Clang indexing errors

Nikolai Kosjar nikolai.kosjar at theqtcompany.com
Fri Jul 31 09:10:27 CEST 2015


Hi again!

On 07/30/2015 04:41 PM, Michael Jackson wrote:
 > Also are there certain "arguments" that QtCreator uses with libClang? 
Things like -Wall or something that has an equivalent clang command line 
argument? Maybe if I put those into my compile specification I can have 
my compiler produce the same warnings?

When it comes to defines and include paths we mostly pass in to libclang 
what the project manager plugin (qmake, qbs, cmake) provides us with. 
There are no special warning options that we add, however, currently no 
warning options are passed along, either. If the compiler is clang or 
gcc, we probably should forward warning options to libclang.

You will see the command line arguments to libclang from the logging 
categories output on stdout/stderr of Qt Creator. Note that you can't 
always copy/paste this to command line and compare - your installed 
llvm/clang might have different system header and framework include 
paths. Therefore, if possible, always try to reduce to a file without 
any includes.

 > Also, how can I force QtCreator to reindex my project? Is there a 
file somewhere that I can delete?

The clang code model does not (yet) create an index. It only provides 
highlighting with diagnostics and completion. You might want to close 
and reopen the file.

 > The July 30 build seems slightly better in the fact that I don't get 
the red squiggly under lines any more BUT the code completion does not 
work for those functions. for example, the line of code has all the same 
"default text" color which is different that the lines above and below 
it where my custom colors are used for objects and methods and variables.

Then please reduce to a minimal example and report :)

Nikolai



More information about the Qt-creator mailing list