[cfe-dev] -fdiagnostics-format= design review : added enum to patch
Sebastian Redl
sebastian.redl at getdesigned.at
Thu May 19 08:56:43 PDT 2011
On 19.05.2011, at 09:25, Douglas Gregor wrote:
>
> On May 18, 2011, at 2:14 PM, Andrew Fish wrote:
>
>> Update patch to use an enum, per Doug's suggestion.
>>
>> <fdiagnostics-formant.patch>
>>
>> Andrew Fish
>
>
> Index: lib/Frontend/CompilerInvocation.cpp
> ===================================================================
> --- lib/Frontend/CompilerInvocation.cpp (revision 131538)
> +++ lib/Frontend/CompilerInvocation.cpp (working copy)
> @@ -273,6 +273,12 @@
> Res.push_back("-fdiagnostics-show-name");
> if (Opts.ShowOptionNames)
> Res.push_back("-fdiagnostics-show-option");
> + if (Opts.Format == 0)
> + Res.push_back("-fdiagnostics-format=clang");
> + else if (Opts.Format == 1)
> + Res.push_back("-fdiagnostics-format=msvc");
> + else if (Opts.Format == 2)
> + Res.push_back("-fdiagnostics-format=vi");
>
> Please use the enumeration constants here.
>
And a switch, maybe?
Sebastian
More information about the cfe-dev
mailing list