blob: ddc857009f57dcd71e58c41aa871a65df2bf94ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// RUN: %clang_cc1 -std=c++20 -fexperimental-new-constant-interpreter %s -verify
// RUN: %clang_cc1 -std=c++20 %s -verify=ref
// expected-no-diagnostics
// ref-no-diagnostics
/// Test that __builtin_strlen() on external/unknown declarations doesn't crash the bytecode interpreter.
extern const char s[];
void foo(char *x)
{
unsigned long len = __builtin_strlen(s);
__builtin_strcpy(x, s);
}
|