]> git.ipfire.org Git - thirdparty/qemu.git/commit
coroutine: annotate coroutine_fn for libclang
authorAlberto Faria <afaria@redhat.com>
Fri, 16 Dec 2022 11:07:57 +0000 (12:07 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 24 Jan 2023 17:26:41 +0000 (18:26 +0100)
commitcbdbc47cee539ed1ef3e9a27adc47e26d1f921c6
tree2959d94c714830f78a69a5281b048d82e0f194c3
parenta4b15a8b9ef25b44fa92a4825312622600c1f37c
coroutine: annotate coroutine_fn for libclang

Clang has a generic __annotate__ attribute that can be used by
static analyzers to understand properties of functions and
analyze the control flow.  Furthermore, unlike TSA annotations, the
__annotate__ attribute applies to function pointers as well.

As a first step towards static analysis of coroutine_fn markers,
attach the attribute to the marker when compiling with clang.

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221216110758.559947-2-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
include/qemu/osdep.h