forked from OSchip/llvm-project
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. llvm-svn: 363074
This commit is contained in:
parent
224410b7c1
commit
d65ef6735a
|
@ -405,25 +405,27 @@ TEST(MinimizeSourceToDependencyDirectivesTest, RawStringLiteral) {
|
|||
"#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",
|
||||
|
|
Loading…
Reference in New Issue