[cfe-commits] [PATCH] Add CommentOptions, allow specifying custom comment block commands
Dmitri Gribenko
gribozavr at gmail.com
Thu Jan 10 09:47:40 PST 2013
================
Comment at: include/clang/Driver/Options.td:329-331
@@ -328,2 +328,5 @@
HelpText<"Use colors in diagnostics">;
+def fcomment_block_commands : CommaJoined<["-"], "fcomment-block-commands=">, Group<f_clang_Group>,
+ HelpText<"Treat each comma separated argument in <arg> as a documentation comment block command">,
+ MetaVarName<"<arg>">;
def fcommon : Flag<["-"], "fcommon">, Group<f_Group>;
----------------
Ben Gertzfield wrote:
> Dmitri Gribenko wrote:
> > I'm not sure if we actually need this option. (If you think that we do need it, we need logic in the driver -- lib/Driver/Tools.cpp -- to pass the option from the driver to -cc1)
> >
> > If you needed this to test the AST construction for custom commands, then you don't need it -- you can just add a test to unittests/AST/CommentParser.cpp
> >
> Gotcha, that's why it wasn't working in my test.
>
> I definitely don't need this to test the AST construction, but I do need an interface to set this from libclang.
>
> It looks like the best way to do that is via command-line parameters, but I'm open to other suggestions.
I agree that it would be better to have this as a command line parameter instead of adding a yet another libclang API to create TranslationUnits.
http://llvm-reviews.chandlerc.com/D272
More information about the cfe-commits
mailing list