https://bugs.kde.org/show_bug.cgi?id=384580
Bug ID: 384580 Summary: Alias template parameter confusion Product: kdevelop Version: git master Platform: Other OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: Language Support: CPP (Clang-based) Assignee: kdevelop-bugs-n...@kde.org Reporter: zarathustra.zoroas...@gmail.com Target Milestone: --- Remember yesteryear's https://bugs.kde.org/show_bug.cgi?id=368067 ? A new variant of this bug exists in clang releases since ~3.8 with regard to alias templates. The following code: class Foo; template<typename Foo> using Bar = Foo; class Foo { void foo(); }; void Foo::foo() { } …now results in the same parameter confusion as in the referenced bug, I've opened this as a new bug only because the cause is novel. Currently, in kdevelop's clang support, the switch() default in visitCursor() in builder.cpp recurses into a given cursor. In Clang 3.8, a cursor was explicitly exposed for template type aliases (CXCursor_TypeAliasTemplateDecl), the children of this cursor consist of, first, a CXCursor_TemplateTypeParameter, and CXCursor_TypeAliasDecl. When one recurses into CXCursor_TypeAliasTemplateDecl, one ends up adding a use for whatever template parameter is specified in the alias. Additionally, formal template type alias use-tracking is broken owing to a mismatch between the cursor stored for the TypeAliasDecl and its parent. It is worth noting that I'm currently trying to patch my issue with alias template tracking and such a fix would likely also resolve this bug, as I assume it just means hooking CXCursor_TypeAliasTemplateDecl into kdevelop's clang machinery. -- You are receiving this mail because: You are watching all bug changes.