[PATCH] D83691: Port Comment option flags to new parsing system
Daniel Grumberg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 13 10:11:27 PDT 2020
dang created this revision.
dang added a reviewer: Bigcheese.
Herald added subscribers: cfe-commits, dexonsmith.
Herald added a project: clang.
Depends on D83690 <https://reviews.llvm.org/D83690>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83691
Files:
clang/include/clang/Driver/Options.td
clang/lib/Frontend/CompilerInvocation.cpp
Index: clang/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -697,7 +697,6 @@
static void ParseCommentArgs(CommentOptions &Opts, ArgList &Args) {
Opts.BlockCommandNames = Args.getAllArgValues(OPT_fcomment_block_commands);
- Opts.ParseAllComments = Args.hasArg(OPT_fparse_all_comments);
}
/// Create a new Regex instance out of the string value in \p RpassArg.
Index: clang/include/clang/Driver/Options.td
===================================================================
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -385,6 +385,11 @@
// Make sure all other -ccc- options are rejected.
def ccc_ : Joined<["-"], "ccc-">, Group<internal_Group>, Flags<[Unsupported]>;
+// Comment Options
+
+def fparse_all_comments : Flag<["-"], "fparse-all-comments">, Group<f_clang_Group>, Flags<[CC1Option]>,
+ MarshallingInfoFlag<"LangOpts->CommentOpts.ParseAllComments", "false">;
+
// Standard Options
def _HASH_HASH_HASH : Flag<["-"], "###">, Flags<[DriverOption, CoreOption]>,
@@ -891,7 +896,6 @@
def fcomment_block_commands : CommaJoined<["-"], "fcomment-block-commands=">, Group<f_clang_Group>, Flags<[CC1Option]>,
HelpText<"Treat each comma separated argument in <arg> as a documentation comment block command">,
MetaVarName<"<arg>">;
-def fparse_all_comments : Flag<["-"], "fparse-all-comments">, Group<f_clang_Group>, Flags<[CC1Option]>;
def frecord_command_line : Flag<["-"], "frecord-command-line">,
Group<f_clang_Group>;
def fno_record_command_line : Flag<["-"], "fno-record-command-line">,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83691.277474.patch
Type: text/x-patch
Size: 1713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200713/7c2c88e6/attachment.bin>
More information about the cfe-commits
mailing list