Integrating iwyu into a CMake build system using CMAKE_C_INCLUDE_WHAT_YOU_USE and CMAKE_CXX_INCLUDE_WHAT_YOU_USE fails on an assertion. It appears what you are building and what toolchain you are using are irrelevant. The same steps work on Fedora 37. Reproducible: Always Steps to Reproduce: 1. Fresh install Fedora 38 Server with the "C Development Tools and Libraries" group selected. 2. Update all packages: sudo dnf upgrade --refresh 3. Install required packages: sudo dnf install cmake iwyu git libcurl-devel openssl-devel 4. Clone a CMake project (I chose Transmission arbitrarily): git clone --recurse-submodules https://github.com/transmission/transmission.git Transmission 5. cd into the project: cd Transmission/ 6. Configure CMake: cmake -B build -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=include-what-you-use -DCMAKE_C_INCLUDE_WHAT_YOU_USE=include-what-you-use -DCMAKE_BUILD_TYPE=RelWithDebInfo 7. Start the build: cmake --build build Actual Results: Build fails with the following error: Error running 'include-what-you-use': /builddir/build/BUILD/include-what-you-use-0.20/iwyu.cc:3735: Assertion failed: sema.getCurScope() != nullptr Expected Results: The build completes successfully with iwyu output. Tested on Fedora 37 to verify that my steps are correct.
FEDORA-2023-a92562d0ea has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-a92562d0ea
FEDORA-2023-a92562d0ea has been pushed to the Fedora 38 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-a92562d0ea` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-a92562d0ea See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-a92562d0ea has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.