[all-commits] [llvm/llvm-project] 1553cb: [Sema] Support negation/parens with __builtin_avai...

George Burgess IV via All-commits all-commits at lists.llvm.org
Wed Oct 9 09:41:15 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1553cb5d3b14a0516c2796c295a3b32d147d13d0
      https://github.com/llvm/llvm-project/commit/1553cb5d3b14a0516c2796c295a3b32d147d13d0
  Author: George Burgess IV <george.burgess.iv at gmail.com>
  Date:   2024-10-09 (Wed, 09 Oct 2024)

  Changed paths:
    M clang/lib/Sema/SemaAvailability.cpp
    M clang/test/Sema/attr-availability.c

  Log Message:
  -----------
  [Sema] Support negation/parens with __builtin_available (#111439)

At present, `__builtin_available` is really restrictive with its use.
Overall, this seems like a good thing, since the analyses behind it are
not very expensive.

That said, it's very straightforward to support these two cases:

```
if ((__builtin_available(foo, *))) {
  // ...
}
```

and

```
if (!__builtin_available(foo, *)) {
  // ...
} else {
  // ...
}
```

Seems nice to do so.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list