From 9b686537f59a63bad05a0cfe7fc5f1096bb7a7c1 Mon Sep 17 00:00:00 2001 From: Gabor Kelemen Date: Sat, 6 Oct 2018 23:25:46 +0200 Subject: find-unneeded-includes: warn about fw decls in namespaces too This regex parsed unneeded fw declarations reported by IWYU in the form of: class foo; But not ones inside namespaces, e.g.: namespace foo { class bar; } namespace com { namespace sun { namespace star { namespace foo { class bar; } } } } Change-Id: Ie2962b9fb1cf9382e8da45903f3716d0311dd58e Reviewed-on: https://gerrit.libreoffice.org/61485 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- bin/find-unneeded-includes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/find-unneeded-includes') diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes index 4196640e5d2b..7f221e646e14 100755 --- a/bin/find-unneeded-includes +++ b/bin/find-unneeded-includes @@ -155,7 +155,7 @@ def processIWYUOutput(iwyuOutput, moduleRules): toRemove.append("%s:%s: %s" % (currentFileName, lineno, include)) continue - match = re.match("- (.*); // lines (.*)-.*", line) + match = re.match("- (.*;(?: })*)* // lines (.*)-.*", line) if match: fwdDecl = match.group(1) lineno = match.group(2) -- cgit