Skip to content

Commit 87f53de

Browse files
committed
apply IWYU include workaround to cfg tests
1 parent 5bb028b commit 87f53de

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/iwyu.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,15 @@ jobs:
148148
# TODO: remove -stdlib= - it should have been taken from the compilation database
149149
iwyu_tool -p cmake.output -j $(nproc) -- -w -Xiwyu --max_line_length=1024 -Xiwyu --comment_style=long -Xiwyu --quoted_includes_first -Xiwyu --update_comments -stdlib=${{ matrix.stdlib }} ${{ matrix.mapping_file_opt }} ${{ matrix.clang_inc }} > iwyu.log
150150
151+
# TODO: run with all configurations
151152
- name: test/cfg
152153
if: matrix.stdlib == 'libstdc++'
153154
run: |
154155
# TODO: redirect to log
155156
./test/cfg/runtests.sh
156157
env:
157158
IWYU: include-what-you-use
159+
IWYU_CLANG_INC: ${{ matrix.clang_inc }}
158160

159161
- uses: actions/upload-artifact@v4
160162
if: success() || failure()

test/cfg/runtests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function get_pkg_config_cflags {
6767

6868
function iwyu_run {
6969
# TODO: convert -I includes provided by pkg-config to -isystem so IWYU does not produce warnings for system headers
70-
${IWYU} "${IWYU_OPTS[@]}" "$@"
70+
${IWYU} "${IWYU_OPTS[@]}" "${IWYU_CLANG_INC}"" "$@"
7171
}
7272
7373
function cc_syntax {

0 commit comments

Comments
 (0)