[Test] Fix test file for C++98 mode

llvm-svn: 344762
This commit is contained in:
David Bolvansky 2018-10-18 21:26:01 +00:00
parent 1b2a9a3b53
commit d46b05df84
1 changed files with 3 additions and 1 deletions

View File

@ -105,10 +105,12 @@ void PR8089() {
// This is accepted as a GNU extension. In C++98, there was no provision for
// expressions with UB to be non-constant.
enum { overflow = 123456 * 234567 }; // expected-warning {{overflow in expression; result is -1106067520 with type 'int'}}
enum { overflow = 123456 * 234567 };
#if __cplusplus >= 201103L
// expected-warning@-2 {{not an integral constant expression}}
// expected-note@-3 {{value 28958703552 is outside the range of representable values}}
#else
// expected-warning@-5 {{overflow in expression; result is -1106067520 with type 'int'}}
#endif
// PR28903