summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2018-10-06 23:25:46 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-10-08 12:15:23 +0200
commit9b686537f59a63bad05a0cfe7fc5f1096bb7a7c1 (patch)
treea4087ebc1d7b82deaa456d48df8f82296bc97057
parentcb9ba1c2d0202b1932b637d83a9458879a1f2e6a (diff)
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 <vmiklos@collabora.co.uk>
-rwxr-xr-xbin/find-unneeded-includes2
1 files changed, 1 insertions, 1 deletions
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)