r331536 - [NFC]Convert Class to use member initialization instead of inline.

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Mon May 7 14:57:02 PDT 2018


On Mon, May 7, 2018 at 12:57 PM Keane, Erich <erich.keane at intel.com> wrote:

> I don’t believe the member initialization for bitfields (of which all the
> ‘0’ values are) happened until C++17, right?
>

Ah, fair point - I hadn't looked at the types, just what was visible in the
patch. (& I don't especially know/recall which standard/etc supported
member initialization of bitfields, but I could certainly believe it didn't
happen until '17)


>   I could definitely member initialize the two enum fields though.
>

*nod*


>
>
> *From:* David Blaikie [mailto:dblaikie at gmail.com]
> *Sent:* Monday, May 7, 2018 12:03 PM
> *To:* Keane, Erich <erich.keane at intel.com>
> *Cc:* cfe-commits at lists.llvm.org
> *Subject:* Re: r331536 - [NFC]Convert Class to use member initialization
> instead of inline.
>
>
>
> Perhaps this should use non-static data member initializers instead?
>
>
>
> On Fri, May 4, 2018 at 9:23 AM Erich Keane via cfe-commits <
> cfe-commits at lists.llvm.org> wrote:
>
> Author: erichkeane
> Date: Fri May  4 09:19:53 2018
> New Revision: 331536
>
> URL: http://llvm.org/viewvc/llvm-project?rev=331536&view=rev
> Log:
> [NFC]Convert Class to use member initialization instead of inline.
>
> Modified:
>     cfe/trunk/include/clang/Frontend/DependencyOutputOptions.h
>
> Modified: cfe/trunk/include/clang/Frontend/DependencyOutputOptions.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/DependencyOutputOptions.h?rev=331536&r1=331535&r2=331536&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Frontend/DependencyOutputOptions.h (original)
> +++ cfe/trunk/include/clang/Frontend/DependencyOutputOptions.h Fri May  4
> 09:19:53 2018
> @@ -65,15 +65,11 @@ public:
>    std::string ModuleDependencyOutputDir;
>
>  public:
> -  DependencyOutputOptions() {
> -    IncludeSystemHeaders = 0;
> -    ShowHeaderIncludes = 0;
> -    UsePhonyTargets = 0;
> -    AddMissingHeaderDeps = 0;
> -    IncludeModuleFiles = 0;
> -    ShowIncludesDest = ShowIncludesDestination::None;
> -    OutputFormat = DependencyOutputFormat::Make;
> -  }
> +  DependencyOutputOptions()
> +      : IncludeSystemHeaders(0), ShowHeaderIncludes(0),
> UsePhonyTargets(0),
> +        AddMissingHeaderDeps(0), IncludeModuleFiles(0),
> +        ShowIncludesDest(ShowIncludesDestination::None),
> +        OutputFormat(DependencyOutputFormat::Make) {}
>  };
>
>  }  // end namespace clang
>
>
> _______________________________________________
> 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/20180507/2abb6047/attachment.html>


More information about the cfe-commits mailing list