[llvm] r351756 - Fix compilation error with gcc 4.8

Pavel Labath via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 21 10:21:04 PST 2019


Author: labath
Date: Mon Jan 21 10:21:03 2019
New Revision: 351756

URL: http://llvm.org/viewvc/llvm-project?rev=351756&view=rev
Log:
Fix compilation error with gcc 4.8

This version of gcc seems to be having issues with raw literals inside macro
arguments. I change the string to use regular string literals instead.

Modified:
    llvm/trunk/unittests/ADT/OptionalTest.cpp

Modified: llvm/trunk/unittests/ADT/OptionalTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/OptionalTest.cpp?rev=351756&r1=351755&r2=351756&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/OptionalTest.cpp (original)
+++ llvm/trunk/unittests/ADT/OptionalTest.cpp Mon Jan 21 10:21:03 2019
@@ -558,10 +558,10 @@ TEST_F(OptionalTest, UseInUnitTests) {
   // Test that we invoke the streaming operators when pretty-printing values in
   // EXPECT macros.
   EXPECT_NONFATAL_FAILURE(EXPECT_EQ(llvm::None, ComparableAndStreamable::get()),
-                          R"(Expected: llvm::None
-      Which is: None
-To be equal to: ComparableAndStreamable::get()
-      Which is: ComparableAndStreamable)");
+                          "Expected: llvm::None\n"
+                          "      Which is: None\n"
+                          "To be equal to: ComparableAndStreamable::get()\n"
+                          "      Which is: ComparableAndStreamable");
 
   // Test that it is still possible to compare objects which do not have a
   // custom streaming operator.




More information about the llvm-commits mailing list