[all-commits] [llvm/llvm-project] 4572ef: [Clang][Interp] `__builtin_os_log_format_buffer_si...

yronglin via All-commits all-commits at lists.llvm.org
Mon Jul 22 18:39:55 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4572efea90f2ddf51c618790a119ad9b6fc2c7ed
      https://github.com/llvm/llvm-project/commit/4572efea90f2ddf51c618790a119ad9b6fc2c7ed
  Author: yronglin <yronglin777 at gmail.com>
  Date:   2024-07-23 (Tue, 23 Jul 2024)

  Changed paths:
    M clang/lib/AST/Interp/ByteCodeEmitter.cpp
    M clang/test/CodeGen/builtins.c

  Log Message:
  -----------
  [Clang][Interp] `__builtin_os_log_format_buffer_size` should be an unevaluated builtin (#99895)

Follow the current behavior of constant evaluator,
`__builtin_os_log_format_buffer_size` should be an unevaluated builtin.

The following code is well-formed:
```
void test_builtin_os_log(void *buf, int i, const char *data) {
  constexpr int len = __builtin_os_log_format_buffer_size("%d %{public}s %{private}.16P", i, data, data);
}
```

Signed-off-by: yronglin <yronglin777 at gmail.com>



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