Message ID | 20190116230545.8745-1-tuliom@linux.ibm.com |
---|---|
State | New |
Headers | show |
Series | [RFC] Ignore source code comments in scripts/check-installed-headers.sh | expand |
diff --git a/scripts/check-installed-headers.sh b/scripts/check-installed-headers.sh index 8e7beffd82..291774c696 100644 --- a/scripts/check-installed-headers.sh +++ b/scripts/check-installed-headers.sh @@ -158,7 +158,9 @@ EOF # Don't repeat work. eval 'case "$h" in ('"$already"') continue;; esac' - if grep -qE "$obsolete_type_re" "$h"; then + # Use the preprocessor to remove comments in the source. + if $cc_cmd -E -fpreprocessed "$h" -o - \ + | grep -qE "$obsolete_type_re"; then echo "*** Obsolete types detected:" grep -HE "$obsolete_type_re" "$h" failed=1