[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / complex-inc-dec.c
blob4c780da9bca4c173a09df07dd963646288d2a955
1 // RUN: %clang_cc1 -verify -pedantic -std=c99 %s
3 void func(void) {
4 _Complex float cf;
5 _Complex double cd;
6 _Complex long double cld;
8 ++cf; // expected-warning {{'++' on an object of complex type is a C2y extension}}
9 ++cd; // expected-warning {{'++' on an object of complex type is a C2y extension}}
10 ++cld; // expected-warning {{'++' on an object of complex type is a C2y extension}}
12 --cf; // expected-warning {{'--' on an object of complex type is a C2y extension}}
13 --cd; // expected-warning {{'--' on an object of complex type is a C2y extension}}
14 --cld; // expected-warning {{'--' on an object of complex type is a C2y extension}}
16 cf++; // expected-warning {{'++' on an object of complex type is a C2y extension}}
17 cd++; // expected-warning {{'++' on an object of complex type is a C2y extension}}
18 cld++; // expected-warning {{'++' on an object of complex type is a C2y extension}}
20 cf--; // expected-warning {{'--' on an object of complex type is a C2y extension}}
21 cd--; // expected-warning {{'--' on an object of complex type is a C2y extension}}
22 cld--; // expected-warning {{'--' on an object of complex type is a C2y extension}}