Compiler.h: add gcc_returns_nonnull, gcc_returns_twice

This commit is contained in:
Max Kellermann
2017-12-18 23:00:13 +01:00
parent 5582367d68
commit edee8a3446
12 changed files with 27 additions and 23 deletions

View File

@@ -116,7 +116,7 @@ struct Tag {
*
* @return a newly allocated tag
*/
gcc_malloc
gcc_malloc gcc_returns_nonnull
static Tag *Merge(const Tag &base, const Tag &add);
/**
@@ -125,7 +125,7 @@ struct Tag {
*
* @return a newly allocated tag
*/
gcc_malloc
gcc_malloc gcc_returns_nonnull
static Tag *MergeReplace(Tag *base, Tag *add);
/**
@@ -148,7 +148,7 @@ struct Tag {
* (e.g. #TAG_ALBUM_ARTIST falls back to #TAG_ARTIST). If
* there is no such value, returns an empty string.
*/
gcc_pure
gcc_pure gcc_returns_nonnull
const char *GetSortValue(TagType type) const noexcept;
class const_iterator {