On 28/11/18 15:39, Thomas Huth wrote: > On 2018-11-28 15:34, Philippe Mathieu-Daudé wrote: >> On 28/11/18 10:58, Thomas Huth wrote: >>> Clang 3.4 does not know the "flatten" attribute yet. We've already >>> introduced the QEMU_FLATTEN macro for this in commit 97ff87c0ed020c2, >>> so use this macro now here, too, to fix this issue. >> >> checkpatch candidate? > > I think we'd rather need a docker-based test with such an old version of > Clang... (since there are also other issues like the double-typedef > problem that regularly occurs there).
I was thinking of something such (broken code!): if ($line =~ /.*__attribute__\w+\(\(flatten\)\)/) { ERROR("Use QEMU_FLATTEN ...\n"); }