https://bugs.kde.org/show_bug.cgi?id=446404
--- Comment #1 from Daniel Santos <daniel.san...@pobox.com> --- This appears to be the source of the problem, at plugins/clang/clangparsejob.cpp:175: if (auto file = findProjectFileItem(tuUrl, &hasBuildSystemInfo)) { This is failing when it should not, as this file belongs to the project: (gdb) p url.c_str() $2 = 0x5555561feb45 "/home/daniel/proj/embedded/openwrt/linux-5.4.143/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c" (gdb) p hasBuildSystemInfo $3 = false In the below backtrace, I added a little debug spew: --- a/plugins/clang/clangparsejob.cpp +++ b/plugins/clang/clangparsejob.cpp @@ -177,6 +177,8 @@ ClangParseJob::ClangParseJob(const IndexedString& url, ILanguageSupport* languag m_environment.addFrameworkDirectories(IDefinesAndIncludesManager::manager()->frameworkDirectories(file)); m_environment.addDefines(IDefinesAndIncludesManager::manager()->defines(file)); m_environment.setParserSettings(ClangSettingsManager::self()->parserSettings(file)); + auto const &ps = m_environment.parserSettings(); + std::cout << "111111111111111111111111 " << ps << std::endl; if (hasBuildSystemInfo) { // Assume the builder invokes the compiler in the build directory. m_environment.setWorkingDirectory(file->project()->buildSystemManager()->buildDirectory(file)); @@ -186,6 +188,8 @@ ClangParseJob::ClangParseJob(const IndexedString& url, ILanguageSupport* languag m_environment.addFrameworkDirectories(IDefinesAndIncludesManager::manager()->frameworkDirectories(tuUrl.str())); m_environment.addDefines(IDefinesAndIncludesManager::manager()->defines(tuUrl.str())); m_environment.setParserSettings(ClangSettingsManager::self()->parserSettings(tuUrl.str())); + auto ps = m_environment.parserSettings(); + std::cout << "222222222222222222222222 " << ps << std::endl; } const bool isSource = ClangHelpers::isSource(tuUrl.str()); #0 ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) (this=this@entry=0x555557849f80, url=..., languageSupport=languageSupport@entry=0x5555569f5138) at ../plugins/clang/clangparsejob.cpp:191 #1 0x00007fff600e11fa in ClangSupport::createParseJob(KDevelop::IndexedString const&) (this=0x5555569f5110, url=...) at ../plugins/clang/clangsupport.cpp:245 #2 0x00007ffff4f75e14 in KDevelop::BackgroundParserPrivate::createParseJob(KDevelop::IndexedString const&, DocumentParsePlan const&) (this=this@entry= 0x555555e72980, url=..., parsePlan=...) at ../kdevplatform/language/backgroundparser/backgroundparser.cpp:369 #3 0x00007ffff4f7740e in KDevelop::BackgroundParserPrivate::parseDocumentsInternal() (this=this@entry=0x555555e72980) at ../kdevplatform/language/backgroundparser/backgroundparser.cpp:309 #4 0x00007ffff4f7270c in KDevelop::BackgroundParser::parseDocuments() (this=0x555555c2a9d0) at ../kdevplatform/language/backgroundparser/backgroundparser.cpp:679 #5 0x00007ffff4f568cd in KDevelop::BackgroundParser::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7fff20017628) at kdevplatform/language/KDevPlatformLanguage_autogen/7BZAXZBZPZ/moc_backgroundparser.cpp:249 #6 0x00007ffff66038c6 in QObject::event(QEvent*) (this=0x555555c2a9d0, e=0x7fff200175e0) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qobject.cpp:1314 #7 0x00007ffff722adaf in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x555555c2a9d0, e=0x7fff200175e0) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r11/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/widgets/kernel/qapplication.cpp:3632 #8 0x00007ffff65d8008 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x555555c2a9d0, event=0x7fff200175e0) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qcoreapplication.cpp:1064 #9 0x00007ffff65db675 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x555555575950) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qcoreapplication.cpp:1821 #10 0x00007ffff662a6d3 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=s@entry=0x5555555fd700) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qeventdispatcher_glib.cpp:277 #11 0x00007ffff2c20065 in g_main_dispatch (context=0x7fffdc005000) at ../glib-2.68.4/glib/gmain.c:3337 #12 g_main_context_dispatch (context=0x7fffdc005000) at ../glib-2.68.4/glib/gmain.c:4055 #13 0x00007ffff2c20408 in g_main_context_iterate (context=context@entry=0x7fffdc005000, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib-2.68.4/glib/gmain.c:4131 #14 0x00007ffff2c204bf in g_main_context_iteration (context=0x7fffdc005000, may_block=1) at ../glib-2.68.4/glib/gmain.c:4196 #15 0x00007ffff662a164 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55555561baa0, flags=...) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qeventdispatcher_glib.cpp:423 #16 0x00007ffff65d69fb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffcfd0, flags=..., flags@entry=...) at ../../include/QtCore/../../../qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/global/qflags.h:69 #17 0x00007ffff65df02d in QCoreApplication::exec() () at ../../include/QtCore/../../../qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/global/qflags.h:121 #18 0x00007ffff6ae2f7c in QGuiApplication::exec() () at /usr/src/debug/dev-qt/qtgui-5.15.2-r13/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/gui/kernel/qguiapplication.cpp:1867 #19 0x00007ffff722ad25 in QApplication::exec() () at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r11/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/widgets/kernel/qapplication.cpp:2824 #20 0x000055555556198e in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at ../app/main.cpp:850 -- You are receiving this mail because: You are watching all bug changes.