[clang-tools-extra] r284360 - ClangMoveTests.cpp: Appease msc18.
NAKAMURA Takumi via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 16 22:09:58 PDT 2016
Author: chapuni
Date: Mon Oct 17 00:09:58 2016
New Revision: 284360
URL: http://llvm.org/viewvc/llvm-project?rev=284360&view=rev
Log:
ClangMoveTests.cpp: Appease msc18.
clang-tools-extra\unittests\clang-move\ClangMoveTests.cpp(216) : error C2593: 'operator =' is ambiguous
llvm\include\llvm/ADT/SmallVector.h(898): could be 'const llvm::SmallVector<std::string,4> &llvm::SmallVector<std::string,4>::operator =(std::initializer_list<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>)'
llvm\include\llvm/ADT/SmallVector.h(893): or 'const llvm::SmallVector<std::string,4> &llvm::SmallVector<std::string,4>::operator =(llvm::SmallVectorImpl<T> &&)'
with
[
T=std::string
]
llvm\include\llvm/ADT/SmallVector.h(883): or 'const llvm::SmallVector<std::string,4> &llvm::SmallVector<std::string,4>::operator =(llvm::SmallVector<std::string,4> &&)'
llvm\include\llvm/ADT/SmallVector.h(873): or 'const llvm::SmallVector<std::string,4> &llvm::SmallVector<std::string,4>::operator =(const llvm::SmallVector<std::string,4> &)'
while trying to match the argument list '(llvm::SmallVector<std::string,4>, initializer-list)'
Modified:
clang-tools-extra/trunk/unittests/clang-move/ClangMoveTests.cpp
Modified: clang-tools-extra/trunk/unittests/clang-move/ClangMoveTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clang-move/ClangMoveTests.cpp?rev=284360&r1=284359&r2=284360&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clang-move/ClangMoveTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clang-move/ClangMoveTests.cpp Mon Oct 17 00:09:58 2016
@@ -213,7 +213,7 @@ runClangMoveOnCode(const move::ClangMove
TEST(ClangMove, MoveHeaderAndCC) {
move::ClangMoveTool::MoveDefinitionSpec Spec;
- Spec.Names = {"a::b::Foo"};
+ Spec.Names = {std::string("a::b::Foo")};
Spec.OldHeader = "foo.h";
Spec.OldCC = "foo.cc";
Spec.NewHeader = "new_foo.h";
@@ -228,7 +228,7 @@ TEST(ClangMove, MoveHeaderAndCC) {
TEST(ClangMove, MoveHeaderOnly) {
move::ClangMoveTool::MoveDefinitionSpec Spec;
- Spec.Names = {"a::b::Foo"};
+ Spec.Names = {std::string("a::b::Foo")};
Spec.OldHeader = "foo.h";
Spec.NewHeader = "new_foo.h";
auto Results = runClangMoveOnCode(Spec);
@@ -239,7 +239,7 @@ TEST(ClangMove, MoveHeaderOnly) {
TEST(ClangMove, MoveCCOnly) {
move::ClangMoveTool::MoveDefinitionSpec Spec;
- Spec.Names = {"a::b::Foo"};
+ Spec.Names = {std::string("a::b::Foo")};
Spec.OldCC = "foo.cc";
Spec.NewCC = "new_foo.cc";
std::string ExpectedHeader = "#include \"foo.h\"\n\n";
@@ -251,7 +251,7 @@ TEST(ClangMove, MoveCCOnly) {
TEST(ClangMove, MoveNonExistClass) {
move::ClangMoveTool::MoveDefinitionSpec Spec;
- Spec.Names = {"NonExistFoo"};
+ Spec.Names = {std::string("NonExistFoo")};
Spec.OldHeader = "foo.h";
Spec.OldCC = "foo.cc";
Spec.NewHeader = "new_foo.h";
More information about the cfe-commits
mailing list