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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363074
91177308-0d34-0410-b5e6-
96231b3b80d8
"#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",