[PATCH] D123887: [HLSL][clang][Driver] Fix test error for use SmallString::data instead SmallString::c_str.
Xiang Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 15 18:55:05 PDT 2022
python3kgae created this revision.
python3kgae added a reviewer: wolfgangp.
Herald added a project: All.
python3kgae requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D123887
Files:
clang/unittests/Driver/ToolChainTest.cpp
Index: clang/unittests/Driver/ToolChainTest.cpp
===================================================================
--- clang/unittests/Driver/ToolChainTest.cpp
+++ clang/unittests/Driver/ToolChainTest.cpp
@@ -472,7 +472,8 @@
Triple = TC.ComputeEffectiveClangTriple(Args);
EXPECT_STREQ(Triple.c_str(), "unknown-unknown-shadermodel");
EXPECT_EQ(Diags.getNumErrors(), 1u);
- EXPECT_STREQ(DiagConsumer->Errors.back().data(), "invalid profile : pss_6_1");
+ EXPECT_STREQ(DiagConsumer->Errors.back().c_str(),
+ "invalid profile : pss_6_1");
Diags.Clear();
DiagConsumer->clear();
@@ -481,7 +482,7 @@
Triple = TC.ComputeEffectiveClangTriple(Args);
EXPECT_STREQ(Triple.c_str(), "unknown-unknown-shadermodel");
EXPECT_EQ(Diags.getNumErrors(), 2u);
- EXPECT_STREQ(DiagConsumer->Errors.back().data(), "invalid profile : ps_6_x");
+ EXPECT_STREQ(DiagConsumer->Errors.back().c_str(), "invalid profile : ps_6_x");
Diags.Clear();
DiagConsumer->clear();
@@ -490,7 +491,8 @@
Triple = TC.ComputeEffectiveClangTriple(Args);
EXPECT_STREQ(Triple.c_str(), "unknown-unknown-shadermodel");
EXPECT_EQ(Diags.getNumErrors(), 3u);
- EXPECT_STREQ(DiagConsumer->Errors.back().data(), "invalid profile : lib_6_1");
+ EXPECT_STREQ(DiagConsumer->Errors.back().c_str(),
+ "invalid profile : lib_6_1");
Diags.Clear();
DiagConsumer->clear();
@@ -499,7 +501,7 @@
Triple = TC.ComputeEffectiveClangTriple(Args);
EXPECT_STREQ(Triple.c_str(), "unknown-unknown-shadermodel");
EXPECT_EQ(Diags.getNumErrors(), 4u);
- EXPECT_STREQ(DiagConsumer->Errors.back().data(), "invalid profile : foo");
+ EXPECT_STREQ(DiagConsumer->Errors.back().c_str(), "invalid profile : foo");
Diags.Clear();
DiagConsumer->clear();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123887.423199.patch
Type: text/x-patch
Size: 1769 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220416/e8e1f5be/attachment.bin>
More information about the cfe-commits
mailing list