Revert "[lldb][test] Remove compiler version check and use regex" (#124101)
[llvm-project.git] / clang / test / C / C11 / n1282.c
blobed952790c883338fdf4479e9d127c91e856c0ba9
1 // RUN: %clang_cc1 -verify -Wunsequenced -Wno-unused-value %s
3 /* WG14 N1282: Yes
4 * Clarification of Expressions
5 */
7 int g;
9 int f(int i) {
10 g = i;
11 return 0;
14 int main(void) {
15 int x;
16 x = (10, g = 1, 20) + (30, g = 2, 40); /* Line A */ // expected-warning {{multiple unsequenced modifications to 'g'}}
17 x = (10, f(1), 20) + (30, f(2), 40); /* Line B */
18 x = (g = 1) + (g = 2); /* Line C */ // expected-warning {{multiple unsequenced modifications to 'g'}}
19 return 0;