[clang-tools-extra] r244596 - Default initialize from explicitly constructed object.

Manuel Klimek via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 08:08:47 PDT 2015


Don't remember which bot it was; the message said something about an
explicit constructor being called for std::map

On Tue, Aug 11, 2015 at 5:00 PM David Blaikie <dblaikie at gmail.com> wrote:

> Which compiler do we support that didn't accept this? I thought we'd
> already grown a few uses of initializer lists like this...
> On Aug 11, 2015 5:13 AM, "Manuel Klimek via cfe-commits" <
> cfe-commits at lists.llvm.org> wrote:
>
>> Author: klimek
>> Date: Tue Aug 11 07:13:15 2015
>> New Revision: 244596
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=244596&view=rev
>> Log:
>> Default initialize from explicitly constructed object.
>>
>> Modified:
>>     clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h
>>
>> Modified: clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h?rev=244596&r1=244595&r2=244596&view=diff
>>
>> ==============================================================================
>> --- clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h
>> (original)
>> +++ clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h Tue Aug
>> 11 07:13:15 2015
>> @@ -48,7 +48,8 @@ runCheckOnCode(StringRef Code, std::vect
>>                 const Twine &Filename = "input.cc",
>>                 ArrayRef<std::string> ExtraArgs = None,
>>                 const ClangTidyOptions &ExtraOptions = ClangTidyOptions(),
>> -               std::map<StringRef, StringRef> PathsToContent = {}) {
>> +               std::map<StringRef, StringRef> PathsToContent =
>> +                   std::map<StringRef, StringRef>()) {
>>    ClangTidyOptions Options = ExtraOptions;
>>    Options.Checks = "*";
>>    ClangTidyContext Context(llvm::make_unique<DefaultOptionsProvider>(
>> @@ -70,7 +71,7 @@ runCheckOnCode(StringRef Code, std::vect
>>    tooling::ToolInvocation Invocation(
>>        ArgCXX11, new TestClangTidyAction(Check, Finder, Context),
>> Files.get());
>>    Invocation.mapVirtualFile(Filename.str(), Code);
>> -  for (const auto & FileContent : PathsToContent) {
>> +  for (const auto &FileContent : PathsToContent) {
>>      Invocation.mapVirtualFile(Twine("include/" +
>> FileContent.first).str(),
>>                                FileContent.second);
>>    }
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150811/1c72d74c/attachment.html>


More information about the cfe-commits mailing list