[Qt-creator] clang branch

Sergey Shambir sergey.shambir.auto at gmail.com
Sun Nov 18 20:55:24 CET 2012


Hello all,

First, thanks to Eric Verbuggen who did perfect clang-based code model 
and continues research in git branch. However, as i heard, he also busy 
in master branch and v4vm. I'm sure that community can help with clang 
initiative, but individual programmers have no enough information about 
branch status, problems or interesting tasks and even about any 
brainstorm results. Can this gap be filled at qt-project wiki?

There are several questions which will be nice to clarify at wiki:
1) What libclang version is minimal requirement? Clang 3.2 will be 
released only in december, but it already has nice API for accessing 
doxygen comments and retrieving @brief comments for completion 
proposals. Possible solution is macro with LLVM version:
     LLVM_VERSION = $$system($$LLVM_CONFIG --version)
     DEFINES += "LLVM_VERSION=$$LLVM_VERSION"
but i can't figure out how to convert float "3.1" (returned by 
"llvm_config --version") into integer that can be compared by preprocessor.

2) libclang is well designed and documented so clang branch has many 
"easy-hack" tasks that can be done by anyone - i mean testing on real 
code and fixing small errors/regressions. It will be nice to have 
easy-hacks list: missed features, regressions with problematic code and 
test for things that already done.

3) What about live diagnostics displaying? Diagnostic message itself can 
be associated with QTextBlock,//////// but should it underscore error 
like native parser or add items to Issues pan like several other IDEs?

4) Clang is slow, so it's better to document any optimization idea at 
qt-project wiki.
  - Pch still not used; and there can be some problems with reading 
previously generated *.pch - i've seen a few posts on stackoverflow and 
failed to read generated pch myself.
  - Higlighting can be done for visible area first, as Eric mentioned 
once in this maillist
  - When user starts typing characters sequence that can be identifier, 
IDE can take document snapshot, ask completions at position before first 
character and show proposals immediately after 1) they will be ready 2) 
user will enter 2-3 characters. Seems XCode uses this trick.

5) Real optimizations can be done only in clang, but interesting 
directions can be mentioned at wiki too
  - Now QtCreator replaces dot with arrow for pointer types, but it 
cannot be done through clang-c API without big overhead. Similar 
features: replace dot with :: for namespaces/type names; show mixed 
proposals for smart pointers
  - Despite that incremental compilation of C++ is horrible challenge, 
clang developers mentioned 
<http://comments.gmane.org/gmane.comp.compilers.clang.devel/7634>: 
"that's certainly a long-term goal"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20121118/3df9cde3/attachment.html>


More information about the Qt-creator mailing list