brintos

brintos / llvm-project-archived public Read only

0
0
Text · 560 B · 3a78e07 Raw
29 lines · c
1// Test this without pch.2// RUN: %clang_cc1 -include %S/struct.h -fsyntax-only -verify %s3 4// Test with pch.5// RUN: %clang_cc1 -emit-pch -o %t %S/struct.h6// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s 7 8struct Point *p1;9 10float getX(struct Point *p1) {11  return p1->x;12}13 14void *get_fun_ptr(void) {15  return fun->is_ptr? fun->ptr : 0;16}17 18struct Fun2 {19  int very_fun;20};21 22int get_very_fun(void) {23  return fun2->very_fun;24}25 26int *int_ptr_fail = &fun->is_ptr; // expected-error{{address of bit-field requested}}27 28struct Nested nested = { 1, 2 };29