After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779797 - Symbol tree isn't working for C++
Symbol tree isn't working for C++
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: general
Flatpak Nightly Channel
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-09 09:59 UTC by Peter
Modified: 2017-03-12 08:49 UTC
See Also:
GNOME target: ---
GNOME version: 3.21/3.22


Attachments
hpp file with a class definition and inline function (51.70 KB, image/png)
2017-03-09 09:59 UTC, Peter
  Details
hpp file with class definition, and member-function defined in cpp file (36.84 KB, image/png)
2017-03-09 10:00 UTC, Peter
  Details
support log of gnome builder (6.04 KB, text/plain)
2017-03-09 10:01 UTC, Peter
  Details
trace log with -vvvv (158.77 KB, text/plain)
2017-03-09 10:01 UTC, Peter
  Details
regular function, symbols are shown as expected (105.23 KB, image/png)
2017-03-09 10:02 UTC, Peter
  Details
clang: add CXXMethod and namespace to symbol tree (965 bytes, patch)
2017-03-12 08:48 UTC, Christian Hergert
committed Details | Review

Description Peter 2017-03-09 09:59:13 UTC
Created attachment 347533 [details]
hpp file with a class definition and inline function

Hello!

Neither gnome-buider-3.22.4 nor gnome-builder-nighlty (flatpak) is able to show the symbol-tree for classes written in C++. I doesn't matter wether it is a header-only class with inline-definitions or a seperate header with a source-file. Symbols are only shown for non-class related source-code and static variables in classes.

Steps to reproduce:
1.) Created a project with the template "C++ & Meson", using gnome-builder-3.22.4, because the nightly flatpack can't create such a project.
2.) Written header-only class (class_with_inline_member_functin.png)
3.) Written header and source class and added source to meson.build in ./src/meson.build (member_function_define_in_source.png)
4.) Writte a regular function in main.cpp (regular_function.png)
5.) Installed flatpack-nighlty
6.) Opened the exising project and created the support-log and the trace-log (I think the flatpack cannot access ninja, right?)


If I remember correctly, this is a long standing bug and not introduced with the last cycle.

Thanks

Note: This bug is based on an discussion via email with Christian.
Comment 1 Peter 2017-03-09 10:00:03 UTC
Created attachment 347534 [details]
hpp file with class definition, and member-function defined in cpp file
Comment 2 Peter 2017-03-09 10:01:07 UTC
Created attachment 347535 [details]
support log of gnome builder
Comment 3 Peter 2017-03-09 10:01:36 UTC
Created attachment 347536 [details]
trace log with -vvvv
Comment 4 Peter 2017-03-09 10:02:13 UTC
Created attachment 347537 [details]
regular function, symbols are shown as expected
Comment 5 Christian Hergert 2017-03-12 08:48:11 UTC
Created attachment 347741 [details] [review]
clang: add CXXMethod and namespace to symbol tree
Comment 6 Christian Hergert 2017-03-12 08:49:24 UTC
Was just missing an enum type in the clang symbol resolver.

Attachment 347741 [details] pushed as e75ea5a - clang: add CXXMethod and namespace to symbol tree