[umbrello-devel] [umbrello] [Bug 338649] Extend C++ import for C++11

Ralf Habacker via KDE Bugzilla bugzilla_noreply at kde.org
Mon Jan 18 15:49:30 UTC 2016


--- Comment #7 from Ralf Habacker <ralf.habacker at freenet.de> ---
(In reply to Ralf Habacker from comment #6)
> 3. The recently used parser is very tolerant against incomplete c++ code,
> which is not the case for clang, which needs to be called similar to a
> compiler building the related source code. Incomplete code may come from
> missing include pathes or defines only available inside the build system of
> the imported source code files. This may require to run the parser similar
> to the coverity scan tools, which runs on top of a configured build system.

If someone will give it a try: For cmake based projects on linux the following
receipt can be used to get an AST (based on the hints at
1. unpack  umbrello source into <umbrello-source-dir>
2. mkdir <umbrello-build-dir>
3. cd <umbrello-build-dir>
4. CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake
5. run clang-check -ast-dump -p $PWD
TranslationUnitDecl 0xf54940 <<invalid sloc>>
|-TypedefDecl 0xf54e80 <<invalid sloc>> __int128_t '__int128'
|-TypedefDecl 0xf54ee0 <<invalid sloc>> __uint128_t 'unsigned __int128'
|-TypedefDecl 0xf552a0 <<invalid sloc>> __builtin_va_list '__va_list_tag [1]'
|-TypedefDecl 0xf55390 </usr/bin/../lib64/clang/3.3/include/stddef.h:34:1,
col:26> ptrdiff_t 'long'
|-TypedefDecl 0xf553f0 <line:42:1, col:23> size_t 'unsigned long'
|-TypedefDecl 0xf55450 </usr/include/QtCore/qglobal.h:1044:1, col:21> qint8
'signed char'

You are receiving this mail because:
You are the assignee for the bug.

More information about the umbrello-devel mailing list