r239816 - Avoid using set::emplace as it is apparently not supported by gcc 4.7.

Daniel Jasper djasper at google.com
Tue Jun 16 06:15:54 PDT 2015


Author: djasper
Date: Tue Jun 16 08:15:54 2015
New Revision: 239816

URL: http://llvm.org/viewvc/llvm-project?rev=239816&view=rev
Log:
Avoid using set::emplace as it is apparently not supported by gcc 4.7.

Modified:
    cfe/trunk/unittests/Tooling/RewriterTest.cpp

Modified: cfe/trunk/unittests/Tooling/RewriterTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/RewriterTest.cpp?rev=239816&r1=239815&r2=239816&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/RewriterTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/RewriterTest.cpp Tue Jun 16 08:15:54 2015
@@ -39,8 +39,8 @@ TEST(Rewriter, ContinuesOverwritingFiles
 
 TEST(Rewriter, AdjacentInsertAndDelete) {
   Replacements Replaces;
-  Replaces.emplace("<file>", 6, 6, "");
-  Replaces.emplace("<file>", 6, 0, "replaced\n");
+  Replaces.insert(Replacement("<file>", 6, 6, ""));
+  Replaces.insert(Replacement("<file>", 6, 0, "replaced\n"));
   EXPECT_EQ("line1\nreplaced\nline3\nline4",
             applyAllReplacements("line1\nline2\nline3\nline4", Replaces));
 }





More information about the cfe-commits mailing list