ClangToTMac failing with ambiguous call to std::string::assign |
|||||
Issue descriptionSomething must have changed in libc++ From https://build.chromium.org/p/chromium.fyi/builders/ClangToTMac/builds/10323/steps/compile/logs/stdio FAILED: obj/net/tools/tld_cleanup/tld_cleanup/tld_cleanup_util.o ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/net/tools/tld_cleanup/tld_cleanup/tld_cleanup_util.o.d -DV8_DEPRECATION_WARNINGS -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DNO_TCMALLOC -DUSE_EXTERNAL_POPUP_MENU=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=276439 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DCOMPONENT_BUILD -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../.. -Igen -fno-strict-aliasing -fstack-protector -fcolor-diagnostics -arch x86_64 -Wall -Werror -Wextra -Wpartial-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -O2 -g1 -isysroot /Applications/Xcode7.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.7 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -fno-threadsafe-statics -fvisibility-inlines-hidden -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -c ../../net/tools/tld_cleanup/tld_cleanup_util.cc -o obj/net/tools/tld_cleanup/tld_cleanup/tld_cleanup_util.o ../../net/tools/tld_cleanup/tld_cleanup_util.cc:168:14: error: call to member function 'assign' is ambiguous domain.assign(data.data(), line_start, line_end - line_start); ~~~~~~~^~~~~~ /b/c/b/ClangToTMac/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/string:966:19: note: candidate function basic_string& assign(const basic_string& __str, size_type __pos, size_type __n=npos); ^ /b/c/b/ClangToTMac/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/string:968:19: note: candidate function basic_string& assign(__self_view __sv, size_type pos, size_type n=npos); ^ /b/c/b/ClangToTMac/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/string:979:9: note: candidate function template not viable: requires 2 arguments, but 3 were provided assign(_InputIterator __first, _InputIterator __last); ^ /b/c/b/ClangToTMac/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/string:987:9: note: candidate function template not viable: requires 2 arguments, but 3 were provided assign(_ForwardIterator __first, _ForwardIterator __last); ^ /b/c/b/ClangToTMac/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/string:969:19: note: candidate function not viable: requires 2 arguments, but 3 were provided basic_string& assign(const value_type* __s, size_type __n); ^ /b/c/b/ClangToTMac/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/string:971:19: note: candidate function not viable: requires 2 arguments, but 3 were provided basic_string& assign(size_type __n, value_type __c); ^ /b/c/b/ClangToTMac/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/string:957:19: note: candidate function not viable: requires single argument '__sv', but 3 arguments were provided basic_string& assign(__self_view __sv) { return assign(__sv.data(), __sv.size()); } ^ /b/c/b/ClangToTMac/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/string:959:19: note: candidate function not viable: requires single argument '__str', but 3 arguments were provided basic_string& assign(const basic_string& __str) { return *this = __str; } ^ /b/c/b/ClangToTMac/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/string:962:19: note: candidate function not viable: requires single argument 'str', but 3 arguments were provided basic_string& assign(basic_string&& str) ^ /b/c/b/ClangToTMac/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/string:970:19: note: candidate function not viable: requires single argument '__s', but 3 arguments were provided basic_string& assign(const value_type* __s); ^ /b/c/b/ClangToTMac/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/string:990:19: note: candidate function not viable: requires single argument '__il', but 3 arguments were provided basic_string& assign(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());} ^ 1 error generated.
,
Jul 22 2016
,
Jul 22 2016
The fix is being submitted: https://codereview.chromium.org/2177653004/ libc++ has become more strict, hurra!
,
Jul 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5c1cf32985988682e68bb3d695009086a314eb39 commit 5c1cf32985988682e68bb3d695009086a314eb39 Author: krasin <krasin@google.com> Date: Fri Jul 22 23:43:10 2016 Fix std::string::assign invocation: pass string instead of char*. According to the C++ standard, the three arguments overload of std::string::assign accepts an std::basic_string: http://en.cppreference.com/w/cpp/string/basic_string/assign Fixing the usage, where char* instead of std::string was passed. This popped up after libc++ became more standard compliant, and now it throws a compiler error. BUG= 630681 Review-Url: https://codereview.chromium.org/2177653004 Cr-Commit-Position: refs/heads/master@{#407302} [modify] https://crrev.com/5c1cf32985988682e68bb3d695009086a314eb39/net/tools/tld_cleanup/tld_cleanup_util.cc
,
Jul 25 2016
The bot is now failing for other reasons. There might be more instances of this one, but let's mark it fixed for now.
,
Jul 25 2016
Well, yes, the iOS bot revealed another instance of this: https://build.chromium.org/p/chromium.fyi/builders/ClangToTiOS/builds/7863/steps/compile/logs/stdio I will go through this list and fix the 3-args invocations: https://cs.chromium.org/search/?q=assign%5B(%5D.*%5C.data&sq=package:chromium&type=cs
,
Jul 25 2016
First CL is out for a review: https://codereview.chromium.org/2177863003/ Looking for more like this.
,
Jul 25 2016
Actually, I have scanned the code search results, and don't see any uses beyond the one in #6 and #7.
,
Jul 25 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8f2bd296ae050bb16ea552d38375d9fc6760d518 commit 8f2bd296ae050bb16ea552d38375d9fc6760d518 Author: krasin <krasin@google.com> Date: Mon Jul 25 21:50:37 2016 net/url_util: fix std::string::assign invocation: pass string instead of char*. According to the C++ standard, the three arguments overload of std::string::assign accepts an std::basic_string: http://en.cppreference.com/w/cpp/string/basic_string/assign Fixing the usage, where char* instead of std::string was passed. This popped up after libc++ became more standard compliant, and now it throws a compiler error. BUG= 630681 Review-Url: https://codereview.chromium.org/2177863003 Cr-Commit-Position: refs/heads/master@{#407599} [modify] https://crrev.com/8f2bd296ae050bb16ea552d38375d9fc6760d518/net/base/url_util.cc
,
Jul 26 2016
Fixed: https://build.chromium.org/p/chromium.fyi/builders/ClangToTiOS/builds/7872 |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by h...@chromium.org
, Jul 22 2016