Skip to content

Commit

Permalink
[clang][Interp] Provide required c++14 warnings
Browse files Browse the repository at this point in the history
This doesn't show up in standards after c++14.
  • Loading branch information
tbaederr committed Jul 20, 2023
1 parent 3b642df commit cf70e89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clang/test/AST/Interp/floats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ namespace compound {
// RHS should be evaluated before LHS, so this should
// write to a[1];
a[i++] += ++i;
#if __cplusplus <= 201402L
// expected-warning@-2 {{multiple unsequenced modifications}} \
// ref-warning@-2 {{multiple unsequenced modifications}}
#endif

return a[1];
}
Expand Down

0 comments on commit cf70e89

Please sign in to comment.