[PATCH] D73937: [Driver] Change -fmax-tokens $arg to -fmax-tokens=$arg
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 3 17:18:01 PST 2020
MaskRay created this revision.
MaskRay added reviewers: hans, rnk, rsmith, thakis.
Herald added subscribers: cfe-commits, usaxena95, kadircet, ilya-biryukov.
Herald added a project: clang.
`-foption $arg` is very uncommon in clangDriver (especially a Separate without a corresponding Joined). Change it to the joined form.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73937
Files:
clang/include/clang/Driver/Options.td
clang/test/Parser/max-tokens.cpp
Index: clang/test/Parser/max-tokens.cpp
===================================================================
--- clang/test/Parser/max-tokens.cpp
+++ clang/test/Parser/max-tokens.cpp
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-// RUN: %clang_cc1 -fsyntax-only -verify %s -DMAX_TOKENS -fmax-tokens 2
-// RUN: %clang_cc1 -fsyntax-only -verify %s -DMAX_TOKENS_OVERRIDE -fmax-tokens 9
+// RUN: %clang_cc1 -fsyntax-only -verify %s -DMAX_TOKENS -fmax-tokens=2
+// RUN: %clang_cc1 -fsyntax-only -verify %s -DMAX_TOKENS_OVERRIDE -fmax-tokens=9
int x, y, z;
Index: clang/include/clang/Driver/Options.td
===================================================================
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -646,7 +646,7 @@
def interface_stub_version_EQ : JoinedOrSeparate<["-"], "interface-stub-version=">, Flags<[CC1Option]>;
def exported__symbols__list : Separate<["-"], "exported_symbols_list">;
def e : JoinedOrSeparate<["-"], "e">, Group<Link_Group>;
-def fmax_tokens : Separate<["-"], "fmax-tokens">,
+def fmax_tokens : Joined<["-"], "fmax-tokens=">,
HelpText<"Max total number of preprocessed tokens for -Wmax-tokens.">,
Group<f_Group>, Flags<[CC1Option]>;
def fPIC : Flag<["-"], "fPIC">, Group<f_Group>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73937.242234.patch
Type: text/x-patch
Size: 1305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200204/5a778c03/attachment.bin>
More information about the cfe-commits
mailing list