Skip to content

Commit 32d6835

Browse files
committed
Include-what-you-use: use clang to avoid spurious errors
iwyu uses clang itself, so is only compatible with compiler command line options that clang takes rather than GCC's.
1 parent 850dfa5 commit 32d6835

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: .github/workflows/pull-request-checks.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -921,9 +921,9 @@ jobs:
921921
DEBIAN_FRONTEND: noninteractive
922922
run: |
923923
sudo apt-get update
924-
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc gdb g++ maven flex bison iwyu
924+
sudo apt-get install --no-install-recommends -yq cmake ninja-build clang-19 clang++-19 gdb maven flex bison iwyu
925925
- name: Configure using CMake
926-
run: cmake -S . -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++
926+
run: cmake -S . -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
927927
- name: Run include-what-you-use
928928
run: |
929929
iwyu_tool -p build/compile_commands.json -j${{env.linux-vcpus}} | tee includes.txt

0 commit comments

Comments
 (0)