llvm-project/clang/test/Sema/struct-cast.c
Timm Baeder cc55af777a
[clang][Interp] Only check ComparisonCategoryInfo in C++ (#80131)
Binary operators are also of struct type in C, when assigning. Don't try to get the ComparisonCategoryInfo in that case.
2024-02-06 22:01:59 +01:00

18 lines
289 B
C

// RUN: %clang_cc1 -fsyntax-only %s -verify
// RUN: %clang_cc1 -fsyntax-only %s -fexperimental-new-constant-interpreter -verify
// expected-no-diagnostics
struct S {
int one;
int two;
};
struct S const foo(void);
struct S tmp;
void priv_sock_init(void) {
tmp = (struct S)foo();
}