Skip to content

Commit cf70e89

Browse files
committed
[clang][Interp] Provide required c++14 warnings
This doesn't show up in standards after c++14.
1 parent 3b642df commit cf70e89

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/test/AST/Interp/floats.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ namespace compound {
9494
// RHS should be evaluated before LHS, so this should
9595
// write to a[1];
9696
a[i++] += ++i;
97+
#if __cplusplus <= 201402L
98+
// expected-warning@-2 {{multiple unsequenced modifications}} \
99+
// ref-warning@-2 {{multiple unsequenced modifications}}
100+
#endif
97101

98102
return a[1];
99103
}

0 commit comments

Comments
 (0)