Skip to content

Commit 8d4cb92

Browse files
authored
[NFC][Clang][Interp] Add more test for __builtin_os_log_format_buffer_size (#100566)
Signed-off-by: yronglin <[email protected]>
1 parent 94e9662 commit 8d4cb92

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/test/AST/Interp/builtins.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,8 @@ constexpr bool assume() {
3131
return true;
3232
}
3333
static_assert(assume(), "");
34+
35+
void test_builtin_os_log(void *buf, int i, const char *data) {
36+
constexpr int len = __builtin_os_log_format_buffer_size("%d %{public}s %{private}.16P", i, data, data);
37+
static_assert(len > 0, "Expect len > 0");
38+
}

0 commit comments

Comments
 (0)