[PATCH] D131808: [clang,flang] Add missing options fsyntax-only in help

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 13 21:33:43 PDT 2022


MaskRay accepted this revision.
MaskRay added a comment.

> Subject: [clang,flang] Add missing options fsyntax-only in help

Prefer `-fsyntax-only` to `fsyntax-only` since the former is what a user writes.

> this pull request contains a fix for the problem with displaying options -fsyntax_only in clang and fland-new in help

typo: `-fsyntax-only`

"this pull request contains a fix" is verbose. Just use an imperative sentence: "Fix ..."



================
Comment at: clang/include/clang/Driver/Options.td:2798-2799
 def fsyntax_only : Flag<["-"], "fsyntax-only">,
-  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option]>, Group<Action_Group>;
+  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option,FlangOption]>, Group<Action_Group>,
+  HelpText<"Syntax-check only">;
 def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group<f_Group>;
----------------
alexiprof wrote:
> awarzynski wrote:
> > Note that:
> > 
> > ```
> > $ gcc --help=common | grep syntax
> >   -fsyntax-only               Check for syntax errors, then stop.
> > ```
> > 
> > and (from Clang [[ https://github.com/llvm/llvm-project/blob/main/clang/docs/CommandGuide/clang.rst | docs ]]
> > >  Run the preprocessor, parser and type checking stages.
> > 
> > For consistency sake, I would replace "Syntax-check only"" with "Run the preprocessor, parser and type checking stages.". Technically, there's no separate preprocessor in Flang, but that's IMO tangential to this.
> Yes, i am replace text
semantic analysis is probably better than "type checking".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131808/new/

https://reviews.llvm.org/D131808



More information about the cfe-commits mailing list