Author: erichkeane Date: Tue Jun 11 07:58:26 2019 New Revision: 363074 URL: http://llvm.org/viewvc/llvm-project?rev=363074&view=rev Log: Fix for r42230, MSVC test failure in DependencyDirectivesSourceMinimizerTest.cpp
r362459 introduced DependencyDirectivesSourceMinimizerTest.cpp, which hits an MSVC bug: developercommunity.visualstudio.com/content/problem/67300/stringifying-raw-string-literal.html This only happens when the parameter to a macro is stringified in the macro. This patch removes the string from the assert so that the warning no longer happens. Modified: cfe/trunk/unittests/Lex/DependencyDirectivesSourceMinimizerTest.cpp Modified: cfe/trunk/unittests/Lex/DependencyDirectivesSourceMinimizerTest.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Lex/DependencyDirectivesSourceMinimizerTest.cpp?rev=363074&r1=363073&r2=363074&view=diff ============================================================================== --- cfe/trunk/unittests/Lex/DependencyDirectivesSourceMinimizerTest.cpp (original) +++ cfe/trunk/unittests/Lex/DependencyDirectivesSourceMinimizerTest.cpp Tue Jun 11 07:58:26 2019 @@ -405,25 +405,27 @@ TEST(MinimizeSourceToDependencyDirective "#endif\n", Out.data()); - ASSERT_FALSE(minimizeSourceToDependencyDirectives( + bool RawStringLiteralResult = minimizeSourceToDependencyDirectives( "#ifndef GUARD\n" "#define GUARD\n" R"raw(static constexpr char bytes[] = R"(-?:\,[]{}#&*!|>'"%@`)";)raw" "\n" "#endif\n", - Out)); + Out); + ASSERT_FALSE(RawStringLiteralResult); EXPECT_STREQ("#ifndef GUARD\n" "#define GUARD\n" "#endif\n", Out.data()); - ASSERT_FALSE(minimizeSourceToDependencyDirectives( + bool RawStringLiteralResult2 = minimizeSourceToDependencyDirectives( "#ifndef GUARD\n" "#define GUARD\n" R"raw(static constexpr char bytes[] = R"abc(-?:\,[]{}#&*!|>'"%@`)abc";)raw" "\n" "#endif\n", - Out)); + Out); + ASSERT_FALSE(RawStringLiteralResult2); EXPECT_STREQ("#ifndef GUARD\n" "#define GUARD\n" "#endif\n", _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits