https://bugs.kde.org/show_bug.cgi?id=478689
Bug ID: 478689 Summary: C++ Semantic analysis gets confused by class inheritance Classification: Applications Product: kdevelop Version: 5.12.230801 Platform: Ubuntu OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: Language Support: CPP (Clang-based) Assignee: kdevelop-bugs-n...@kde.org Reporter: mattia.basag...@gmail.com Target Milestone: --- Created attachment 164276 --> https://bugs.kde.org/attachment.cgi?id=164276&action=edit Screenshot showing kdevelop properly detects base classes but still marks them as an error SUMMARY It seems KDevelop starts giving type errors for conversions between a pointer to a derived class to its base class / ancestors. It correctly finds the methods and highlights them / give the correct info on hover but marks it as an error. This happens both with function calls and access to members declared in base classes using `->`. It seems to be caused by multiple inheritance because commenting out one of the base classes seems to fix the issue. The same codebase worked fine a couple kdevelop versions ago. STEPS TO REPRODUCE 1. For me it happens for this class: https://invent.kde.org/graphics/glaxnimate/-/blob/master/src/gui/widgets/dialogs/glaxnimate_window.hpp#L40 2. Open the project mentioned above with kdevelop 3. Open https://invent.kde.org/graphics/glaxnimate/-/blob/master/src/gui/widgets/dialogs/gw_impl_ui.cpp OBSERVED RESULT Bunch of correct code marked as an error EXPECTED RESULT It shouldn't mark it SOFTWARE/OS VERSIONS Operating System: Kubuntu 23.10 KDE Plasma Version: 5.27.8 KDE Frameworks Version: 5.110.0 Qt Version: 5.15.10 Kernel Version: 6.5.0-14-generic (64-bit) Graphics Platform: X11 Processors: 8 × AMD FX(tm)-8320 Eight-Core Processor Memory: 31.4 GiB of RAM Graphics Processor: AMD Radeon RX 470 Graphics Manufacturer: NOVATECH LTD Product Name: PC-X006665 System Version: V1.0 -- You are receiving this mail because: You are watching all bug changes.