| Summary: | Kdevelop clang parser has many issues | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Ted <TedFedora> |
| Component: | Language Support: CPP (Clang-based) | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 5.0.3 | ||
| Target Milestone: | --- | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Ted
2016-12-20 19:33:30 UTC
The settings I am referring to are under project->Open Configuration...->Language Support Maybe this is an issue with c++11 v.s. older ABI When I pulled up a project that had c++11 for the language version then I do see std::string interpreted correctly: typedef basic_string< char, std< char >, std< char > > string Container: __cxx11 Kind: Typedef Decl.: stringfwd.h :74 Show uses If I try to use 03 it reverts to this: typedef int string Container: __cxx11 Kind: Typedef Decl.: stringfwd.h :74 Show uses If I include the define for _GLIBCXX_USE_CXX11_ABI 0 then back to this: (Using 03 or 11, doesn't matter). typedef int string Container: std Kind: Typedef Decl.: stringfwd.h :74 Show uses Further strangeness: I have found while initially reparsing my project with the only change in project->Open Configuration...->Language Support _GLIBCXX_USE_CXX11_ABI 0 std::string Show correctly typedef basic_string< char, std< char >, std< char > > string Container: std Kind: Typedef Decl.: stringfwd.h :74 Show uses But somewhere during the reparsing back to this: typedef int string Container: std Kind: Typedef Decl.: stringfwd.h :74 Show uses Looks like this has boiled down to the lack of pkg-config support. I am using glib and in my Makefile I use `pkg-config glib-2.0 --cflags` As you may know, this will provide the paths: -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include It appears that the clang parser will not be able to parse if these paths are not present and hence the strange behavior with the STL includes. Is there a way to add the pkg-config support into the parser? The whole problem was relying on the Makefile to supply the include paths. Apparently KDevelop does not parse pkg-config entires in the Makefile. I added the needed include files paths in Kdevelop and resolved the problem. I must say that with my issues resolved, the Background parser is working very well. I am very impressed with Kdevelop 5.x.x. Thanks, glad you figured out how to solve the problems! I would like to add a comment that may help others stumbling across this issue. If there are any RED issues reported in Problems for include files, the parser will not work. You must resolve these problems in order for the parser to work again. |