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

David Bolvansky via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 18 14:26:01 PDT 2018


Author: xbolva00
Date: Thu Oct 18 14:26:01 2018
New Revision: 344762

URL: http://llvm.org/viewvc/llvm-project?rev=344762&view=rev
Log:
[Test] Fix test file for C++98 mode

Modified:
    cfe/trunk/test/SemaCXX/enum.cpp

Modified: cfe/trunk/test/SemaCXX/enum.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/enum.cpp?rev=344762&r1=344761&r2=344762&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/enum.cpp (original)
+++ cfe/trunk/test/SemaCXX/enum.cpp Thu Oct 18 14:26:01 2018
@@ -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 at -2 {{not an integral constant expression}}
 // expected-note at -3 {{value 28958703552 is outside the range of representable values}}
+#else 
+// expected-warning at -5 {{overflow in expression; result is -1106067520 with type 'int'}}
 #endif
 
 // PR28903




More information about the cfe-commits mailing list