bin/find-unneeded-includes | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit bd135e5f294ac58bda8007d1553202ae6f9b621f
Author: Gabor Kelemen <[email protected]>
AuthorDate: Fri Jan 3 22:53:49 2025 +0100
Commit: Miklos Vajna <[email protected]>
CommitDate: Wed Apr 9 13:31:37 2025 +0200
find-unneeded-includes: work around iwyu bug seen in --fwdecl mode
it suggests an empty string to remove, skip that
so that find-unneeded-includes does not crash
Change-Id: Iaee2d874094451cc0042f6b3f5007462d7f6b5e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183877
Reviewed-by: Miklos Vajna <[email protected]>
Tested-by: Jenkins
diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes
index ec0a620c9090..100ee38c6672 100755
--- a/bin/find-unneeded-includes
+++ b/bin/find-unneeded-includes
@@ -226,6 +226,9 @@ def processIWYUOutput(iwyuOutput, moduleRules, fileName,
noexclude, checknamespa
match = re.match("- (.*;(?: })*)* // lines (.*)-.*", line)
if match:
fwdDecl = match.group(1)
+ # Bug: IWYU 0.23 gives "- // lines 76-76" on
basctl/source/inc/layout.hxx in --fwdecl mode
+ if fwdDecl is None:
+ continue
if fwdDecl.endswith(";"):
# Remove trailing semicolon.
fwdDecl = fwdDecl[:-1]