[PATCH] D33383: [GSoC] Flag value completion for clang

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 19 02:40:56 PDT 2017


v.g.vassilev accepted this revision.
v.g.vassilev added a comment.
This revision is now accepted and ready to land.

LGTM. My comments can be addressed in a separate patch.



================
Comment at: clang/include/clang/Driver/Options.td:496
 def cl_std_EQ : Joined<["-"], "cl-std=">, Group<opencl_Group>, Flags<[CC1Option]>,
-  HelpText<"OpenCL language standard to compile for.">;
+  HelpText<"OpenCL language standard to compile for.">, Values<"cl,CL,cl1.1,CL1.1,cl1.2,CL1.2,cl2.0,CL2.0">;
 def cl_denorms_are_zero : Flag<["-"], "cl-denorms-are-zero">, Group<opencl_Group>, Flags<[CC1Option]>,
----------------
I think we should have a way to express that the values are case insensitive, instead of enumerating all possible combinations.


================
Comment at: clang/include/clang/Driver/Options.td:1341
   HelpText<"Which overload candidates to show when overload resolution fails: "
-           "best|all; defaults to all">;
+           "best|all; defaults to all">, Values<"best,all">;
 def fshow_column : Flag<["-"], "fshow-column">, Group<f_Group>, Flags<[CC1Option]>;
----------------
We should be able to express which value is the default value if nothing is specified. A non-very readable solution would be to put the default always as the first value.


https://reviews.llvm.org/D33383





More information about the cfe-commits mailing list