Skip to content

Commit 6b48db2

Browse files
Andy Whitcrofttorvalds
authored andcommitted
checkpatch: typeof may have more complex arguments
typeof may have various more complex forms as its arguement, not just an identifier. For now allow us to leak to the first close perenthesis ')'. Signed-off-by: Andy Whitcroft <apw@canonical.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent addcdce commit 6b48db2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/checkpatch.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ sub build_types {
315315
$NonptrType = qr{
316316
(?:$Modifier\s+|const\s+)*
317317
(?:
318-
(?:typeof|__typeof__)\s*\(\s*\**\s*$Ident\s*\)|
318+
(?:typeof|__typeof__)\s*\([^\)]*\)|
319319
(?:$typeTypedefs\b)|
320320
(?:${all}\b)
321321
)

0 commit comments

Comments
 (0)