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

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 08:00:21 PDT 2015


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/a8dd535f/attachment-0001.html>


More information about the cfe-commits mailing list