From: David Bolvansky Date: Thu, 18 Oct 2018 21:26:01 +0000 (+0000) Subject: [Test] Fix test file for C++98 mode X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad1dc6bdd2fdcd025371797c37ccee751789e57c;p=clang [Test] Fix test file for C++98 mode git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344762 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaCXX/enum.cpp b/test/SemaCXX/enum.cpp index 32e509f89e..16ebebe31b 100644 --- a/test/SemaCXX/enum.cpp +++ b/test/SemaCXX/enum.cpp @@ -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