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

2022-08-12 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof created this revision.
Herald added a reviewer: sscalpone.
Herald added a project: All.
alexiprof requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

this pull request contains a fix for the problem with displaying options 
-fsyntax_only in clang and fland-new in help
https://github.com/llvm/llvm-project/issues/57033

After:
clang  -help | grep syntax

  -objcmt-migrate-property-dot-syntax
 Enable migration of setter/getter messages to property-dot syntax

Before:
clang -help | grep syntax

  -fsyntax-only   Syntax-check only
  -objcmt-migrate-property-dot-syntax
 Enable migration of setter/getter messages to property-dot syntax


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131808

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/UsersManual.rst
  clang/include/clang/Driver/Options.td


Index: clang/include/clang/Driver/Options.td
===
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -2795,7 +2795,8 @@
 def fdriver_only : Flag<["-"], "fdriver-only">, Flags<[NoXarchOption, 
CoreOption]>,
   Group, HelpText<"Only run the driver.">;
 def fsyntax_only : Flag<["-"], "fsyntax-only">,
-  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option]>, Group;
+  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option,FlangOption]>, 
Group,
+  HelpText<"Syntax-check only">;
 def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group;
 def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group;
 def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group;
@@ -3209,8 +3210,8 @@
 Flags<[NoXarchOption]>,
 HelpText<"Restore the default behavior of not embedding source text in 
DWARF debug sections">;
 def headerpad__max__install__names : Joined<["-"], 
"headerpad_max_install_names">;
-def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption, FC1Option,
-FlangOption]>, HelpText<"Display available options">,
+def help : Flag<["-", "--"], "help">, 
Flags<[CC1Option,CC1AsOption,FC1Option,FlangOption]>,
+  HelpText<"Display available options">,
 MarshallingInfoFlag>;
 def ibuiltininc : Flag<["-"], "ibuiltininc">,
   HelpText<"Enable builtin #include directories even when -nostdinc is used "
Index: clang/docs/UsersManual.rst
===
--- clang/docs/UsersManual.rst
+++ clang/docs/UsersManual.rst
@@ -4130,6 +4130,7 @@
   behavior. See user manual for available checks
   -fsplit-lto-unitEnables splitting of the LTO unit.
   -fstandalone-debug  Emit full debug info for all types used by the 
program
+  -fsyntax-only   Syntax-check only
   -fwhole-program-vtables Enables whole-program vtable optimization. 
Requires -flto
   -gcodeview-ghashEmit type record hashes in a .debug$H section
   -gcodeview  Generate CodeView debug information
Index: clang/docs/ClangCommandLineReference.rst
===
--- clang/docs/ClangCommandLineReference.rst
+++ clang/docs/ClangCommandLineReference.rst
@@ -831,6 +831,8 @@
 
 .. option:: -fsyntax-only
 
+Syntax-check only
+
 .. option:: -module-file-info
 
 Provide information about a particular module file


Index: clang/include/clang/Driver/Options.td
===
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -2795,7 +2795,8 @@
 def fdriver_only : Flag<["-"], "fdriver-only">, Flags<[NoXarchOption, CoreOption]>,
   Group, HelpText<"Only run the driver.">;
 def fsyntax_only : Flag<["-"], "fsyntax-only">,
-  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option]>, Group;
+  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option,FlangOption]>, Group,
+  HelpText<"Syntax-check only">;
 def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group;
 def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group;
 def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group;
@@ -3209,8 +3210,8 @@
 Flags<[NoXarchOption]>,
 HelpText<"Restore the default behavior of not embedding source text in DWARF debug sections">;
 def headerpad__max__install__names : Joined<["-"], "headerpad_max_install_names">;
-def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption, FC1Option,
-FlangOption]>, HelpText<"Display available options">,
+def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption,FC1Option,FlangOption]>,
+  HelpText<"Display available options">,
 MarshallingInfoFlag>;
 def ibuiltininc : Flag<["-"], "ibuiltininc">,
   HelpText<"Enable builtin #include directories even when -nostdinc is used "
Index: clang/docs/UsersManual.rst
===
--- clang/docs/UsersManual.rst
+++ clang/docs/UsersManual.r

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

2022-08-12 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof updated this revision to Diff 452382.
alexiprof added a comment.

This is commit fix flang unit tests in using help command


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131808

Files:
  flang/test/Driver/driver-help-hidden.f90
  flang/test/Driver/driver-help.f90


Index: flang/test/Driver/driver-help.f90
===
--- flang/test/Driver/driver-help.f90
+++ flang/test/Driver/driver-help.f90
@@ -42,6 +42,7 @@
 ! HELP-NEXT: -fno-integrated-as  Disable the integrated assembler
 ! HELP-NEXT: -fopenacc  Enable OpenACC
 ! HELP-NEXT: -fopenmp   Parse OpenMP pragmas and generate parallel 
code.
+! HELP-NEXT: -fsyntax-only  Syntax-check only
 ! HELP-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! HELP-NEXT: -help  Display available options
 ! HELP-NEXT: -IAdd directory to the end of the list of 
include search paths
Index: flang/test/Driver/driver-help-hidden.f90
===
--- flang/test/Driver/driver-help-hidden.f90
+++ flang/test/Driver/driver-help-hidden.f90
@@ -44,6 +44,7 @@
 ! CHECK-NEXT: -fno-integrated-as Disable the integrated assembler
 ! CHECK-NEXT: -fopenacc  Enable OpenACC
 ! CHECK-NEXT: -fopenmp   Parse OpenMP pragmas and generate 
parallel code.
+! CHECK-NEXT: -fsyntax-only  Syntax-check only
 ! CHECK-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! CHECK-NEXT: -help Display available options
 ! CHECK-NEXT: -IAdd directory to the end of the list of 
include search paths


Index: flang/test/Driver/driver-help.f90
===
--- flang/test/Driver/driver-help.f90
+++ flang/test/Driver/driver-help.f90
@@ -42,6 +42,7 @@
 ! HELP-NEXT: -fno-integrated-as  Disable the integrated assembler
 ! HELP-NEXT: -fopenacc  Enable OpenACC
 ! HELP-NEXT: -fopenmp   Parse OpenMP pragmas and generate parallel code.
+! HELP-NEXT: -fsyntax-only  Syntax-check only
 ! HELP-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! HELP-NEXT: -help  Display available options
 ! HELP-NEXT: -IAdd directory to the end of the list of include search paths
Index: flang/test/Driver/driver-help-hidden.f90
===
--- flang/test/Driver/driver-help-hidden.f90
+++ flang/test/Driver/driver-help-hidden.f90
@@ -44,6 +44,7 @@
 ! CHECK-NEXT: -fno-integrated-as Disable the integrated assembler
 ! CHECK-NEXT: -fopenacc  Enable OpenACC
 ! CHECK-NEXT: -fopenmp   Parse OpenMP pragmas and generate parallel code.
+! CHECK-NEXT: -fsyntax-only  Syntax-check only
 ! CHECK-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! CHECK-NEXT: -help Display available options
 ! CHECK-NEXT: -IAdd directory to the end of the list of include search paths
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2022-08-12 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof updated this revision to Diff 452383.
alexiprof added a comment.

Fix revision

Differential Revision: https://reviews.llvm.org/D131808


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131808

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/UsersManual.rst
  clang/include/clang/Driver/Options.td
  flang/test/Driver/driver-help-hidden.f90
  flang/test/Driver/driver-help.f90


Index: flang/test/Driver/driver-help.f90
===
--- flang/test/Driver/driver-help.f90
+++ flang/test/Driver/driver-help.f90
@@ -42,6 +42,7 @@
 ! HELP-NEXT: -fno-integrated-as  Disable the integrated assembler
 ! HELP-NEXT: -fopenacc  Enable OpenACC
 ! HELP-NEXT: -fopenmp   Parse OpenMP pragmas and generate parallel 
code.
+! HELP-NEXT: -fsyntax-only  Syntax-check only
 ! HELP-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! HELP-NEXT: -help  Display available options
 ! HELP-NEXT: -IAdd directory to the end of the list of 
include search paths
Index: flang/test/Driver/driver-help-hidden.f90
===
--- flang/test/Driver/driver-help-hidden.f90
+++ flang/test/Driver/driver-help-hidden.f90
@@ -44,6 +44,7 @@
 ! CHECK-NEXT: -fno-integrated-as Disable the integrated assembler
 ! CHECK-NEXT: -fopenacc  Enable OpenACC
 ! CHECK-NEXT: -fopenmp   Parse OpenMP pragmas and generate 
parallel code.
+! CHECK-NEXT: -fsyntax-only  Syntax-check only
 ! CHECK-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! CHECK-NEXT: -help Display available options
 ! CHECK-NEXT: -IAdd directory to the end of the list of 
include search paths
Index: clang/include/clang/Driver/Options.td
===
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -2795,7 +2795,8 @@
 def fdriver_only : Flag<["-"], "fdriver-only">, Flags<[NoXarchOption, 
CoreOption]>,
   Group, HelpText<"Only run the driver.">;
 def fsyntax_only : Flag<["-"], "fsyntax-only">,
-  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option]>, Group;
+  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option,FlangOption]>, 
Group,
+  HelpText<"Syntax-check only">;
 def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group;
 def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group;
 def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group;
@@ -3209,8 +3210,8 @@
 Flags<[NoXarchOption]>,
 HelpText<"Restore the default behavior of not embedding source text in 
DWARF debug sections">;
 def headerpad__max__install__names : Joined<["-"], 
"headerpad_max_install_names">;
-def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption, FC1Option,
-FlangOption]>, HelpText<"Display available options">,
+def help : Flag<["-", "--"], "help">, 
Flags<[CC1Option,CC1AsOption,FC1Option,FlangOption]>,
+  HelpText<"Display available options">,
 MarshallingInfoFlag>;
 def ibuiltininc : Flag<["-"], "ibuiltininc">,
   HelpText<"Enable builtin #include directories even when -nostdinc is used "
Index: clang/docs/UsersManual.rst
===
--- clang/docs/UsersManual.rst
+++ clang/docs/UsersManual.rst
@@ -4130,6 +4130,7 @@
   behavior. See user manual for available checks
   -fsplit-lto-unitEnables splitting of the LTO unit.
   -fstandalone-debug  Emit full debug info for all types used by the 
program
+  -fsyntax-only   Syntax-check only
   -fwhole-program-vtables Enables whole-program vtable optimization. 
Requires -flto
   -gcodeview-ghashEmit type record hashes in a .debug$H section
   -gcodeview  Generate CodeView debug information
Index: clang/docs/ClangCommandLineReference.rst
===
--- clang/docs/ClangCommandLineReference.rst
+++ clang/docs/ClangCommandLineReference.rst
@@ -831,6 +831,8 @@
 
 .. option:: -fsyntax-only
 
+Syntax-check only
+
 .. option:: -module-file-info
 
 Provide information about a particular module file


Index: flang/test/Driver/driver-help.f90
===
--- flang/test/Driver/driver-help.f90
+++ flang/test/Driver/driver-help.f90
@@ -42,6 +42,7 @@
 ! HELP-NEXT: -fno-integrated-as  Disable the integrated assembler
 ! HELP-NEXT: -fopenacc  Enable OpenACC
 ! HELP-NEXT: -fopenmp   Parse OpenMP pragmas and generate parallel code.
+! HELP-NEXT: -fsyntax-only  Syntax-check only
 ! HELP-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! HELP-NEXT: -help  Display available options
 ! HE

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

2022-08-13 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof updated this revision to Diff 452393.
alexiprof added a comment.

fix tests


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131808

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/UsersManual.rst
  clang/include/clang/Driver/Options.td
  flang/test/Driver/driver-help-hidden.f90
  flang/test/Driver/driver-help.f90


Index: flang/test/Driver/driver-help.f90
===
--- flang/test/Driver/driver-help.f90
+++ flang/test/Driver/driver-help.f90
@@ -42,6 +42,7 @@
 ! HELP-NEXT: -fno-integrated-as  Disable the integrated assembler
 ! HELP-NEXT: -fopenacc  Enable OpenACC
 ! HELP-NEXT: -fopenmp   Parse OpenMP pragmas and generate parallel 
code.
+! HELP-NEXT: -fsyntax-only  Syntax-check only
 ! HELP-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! HELP-NEXT: -help  Display available options
 ! HELP-NEXT: -IAdd directory to the end of the list of 
include search paths
@@ -119,6 +120,7 @@
 ! HELP-FC1-NEXT: -fno-reformat  Dump the cooked character stream in -E 
mode
 ! HELP-FC1-NEXT: -fopenacc  Enable OpenACC
 ! HELP-FC1-NEXT: -fopenmp   Parse OpenMP pragmas and generate 
parallel code.
+! HELP-FC1-NEXT: -fsyntax-only  Syntax-check only
 ! HELP-FC1-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! HELP-FC1-NEXT: -help  Display available options
 ! HELP-FC1-NEXT: -init-only Only execute frontend initialization
Index: flang/test/Driver/driver-help-hidden.f90
===
--- flang/test/Driver/driver-help-hidden.f90
+++ flang/test/Driver/driver-help-hidden.f90
@@ -44,6 +44,7 @@
 ! CHECK-NEXT: -fno-integrated-as Disable the integrated assembler
 ! CHECK-NEXT: -fopenacc  Enable OpenACC
 ! CHECK-NEXT: -fopenmp   Parse OpenMP pragmas and generate 
parallel code.
+! CHECK-NEXT: -fsyntax-only  Syntax-check only
 ! CHECK-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! CHECK-NEXT: -help Display available options
 ! CHECK-NEXT: -IAdd directory to the end of the list of 
include search paths
Index: clang/include/clang/Driver/Options.td
===
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -2795,7 +2795,8 @@
 def fdriver_only : Flag<["-"], "fdriver-only">, Flags<[NoXarchOption, 
CoreOption]>,
   Group, HelpText<"Only run the driver.">;
 def fsyntax_only : Flag<["-"], "fsyntax-only">,
-  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option]>, Group;
+  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option,FlangOption]>, 
Group,
+  HelpText<"Syntax-check only">;
 def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group;
 def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group;
 def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group;
@@ -3209,8 +3210,8 @@
 Flags<[NoXarchOption]>,
 HelpText<"Restore the default behavior of not embedding source text in 
DWARF debug sections">;
 def headerpad__max__install__names : Joined<["-"], 
"headerpad_max_install_names">;
-def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption, FC1Option,
-FlangOption]>, HelpText<"Display available options">,
+def help : Flag<["-", "--"], "help">, 
Flags<[CC1Option,CC1AsOption,FC1Option,FlangOption]>,
+  HelpText<"Display available options">,
 MarshallingInfoFlag>;
 def ibuiltininc : Flag<["-"], "ibuiltininc">,
   HelpText<"Enable builtin #include directories even when -nostdinc is used "
Index: clang/docs/UsersManual.rst
===
--- clang/docs/UsersManual.rst
+++ clang/docs/UsersManual.rst
@@ -4130,6 +4130,7 @@
   behavior. See user manual for available checks
   -fsplit-lto-unitEnables splitting of the LTO unit.
   -fstandalone-debug  Emit full debug info for all types used by the 
program
+  -fsyntax-only   Syntax-check only
   -fwhole-program-vtables Enables whole-program vtable optimization. 
Requires -flto
   -gcodeview-ghashEmit type record hashes in a .debug$H section
   -gcodeview  Generate CodeView debug information
Index: clang/docs/ClangCommandLineReference.rst
===
--- clang/docs/ClangCommandLineReference.rst
+++ clang/docs/ClangCommandLineReference.rst
@@ -831,6 +831,8 @@
 
 .. option:: -fsyntax-only
 
+Syntax-check only
+
 .. option:: -module-file-info
 
 Provide information about a particular module file


Index: flang/test/Driver/driver-help.f90
===
--- flang/test/Driver/dri

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

2022-08-13 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof added a comment.

In D131808#3720910 , @awarzynski 
wrote:

> Thanks, mostly makes sense! https://github.com/llvm/llvm-project/issues/57033 
> mentions `-O{n}` as well :) Could you fix that too? More comments inline.
>
> CI is still failing :( Are you able to re-produce that? (I'm traveling atm, 
> so can't check).

@awarzynski thanks for the feedback
Yes, if is valid phrase for flang and clang "Run the preprocessor, parser and 
type checking stages", I'll put it on.

in `gcc` optimization level displayed:

  -O  Set optimization level to .

I can add this to the list, but I think it's better to make it a separate patch


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131808

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2022-08-13 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof updated this revision to Diff 452405.
alexiprof added a comment.

Set new text hint for option fsyntax-only


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131808

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/UsersManual.rst
  clang/include/clang/Driver/Options.td
  flang/test/Driver/driver-help-hidden.f90
  flang/test/Driver/driver-help.f90


Index: flang/test/Driver/driver-help.f90
===
--- flang/test/Driver/driver-help.f90
+++ flang/test/Driver/driver-help.f90
@@ -42,6 +42,7 @@
 ! HELP-NEXT: -fno-integrated-as  Disable the integrated assembler
 ! HELP-NEXT: -fopenacc  Enable OpenACC
 ! HELP-NEXT: -fopenmp   Parse OpenMP pragmas and generate parallel 
code.
+! HELP-NEXT: -fsyntax-only  Run the preprocessor, parser and type 
checking stages
 ! HELP-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! HELP-NEXT: -help  Display available options
 ! HELP-NEXT: -IAdd directory to the end of the list of 
include search paths
@@ -119,6 +120,7 @@
 ! HELP-FC1-NEXT: -fno-reformat  Dump the cooked character stream in -E 
mode
 ! HELP-FC1-NEXT: -fopenacc  Enable OpenACC
 ! HELP-FC1-NEXT: -fopenmp   Parse OpenMP pragmas and generate 
parallel code.
+! HELP-FC1-NEXT: -fsyntax-only  Run the preprocessor, parser and type 
checking stages
 ! HELP-FC1-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! HELP-FC1-NEXT: -help  Display available options
 ! HELP-FC1-NEXT: -init-only Only execute frontend initialization
Index: flang/test/Driver/driver-help-hidden.f90
===
--- flang/test/Driver/driver-help-hidden.f90
+++ flang/test/Driver/driver-help-hidden.f90
@@ -44,6 +44,7 @@
 ! CHECK-NEXT: -fno-integrated-as Disable the integrated assembler
 ! CHECK-NEXT: -fopenacc  Enable OpenACC
 ! CHECK-NEXT: -fopenmp   Parse OpenMP pragmas and generate 
parallel code.
+! CHECK-NEXT: -fsyntax-only  Run the preprocessor, parser and type 
checking stages
 ! CHECK-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! CHECK-NEXT: -help Display available options
 ! CHECK-NEXT: -IAdd directory to the end of the list of 
include search paths
Index: clang/include/clang/Driver/Options.td
===
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -2795,7 +2795,8 @@
 def fdriver_only : Flag<["-"], "fdriver-only">, Flags<[NoXarchOption, 
CoreOption]>,
   Group, HelpText<"Only run the driver.">;
 def fsyntax_only : Flag<["-"], "fsyntax-only">,
-  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option]>, Group;
+  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option,FlangOption]>, 
Group,
+  HelpText<"Run the preprocessor, parser and type checking stages">;
 def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group;
 def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group;
 def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group;
@@ -3209,8 +3210,8 @@
 Flags<[NoXarchOption]>,
 HelpText<"Restore the default behavior of not embedding source text in 
DWARF debug sections">;
 def headerpad__max__install__names : Joined<["-"], 
"headerpad_max_install_names">;
-def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption, FC1Option,
-FlangOption]>, HelpText<"Display available options">,
+def help : Flag<["-", "--"], "help">, 
Flags<[CC1Option,CC1AsOption,FC1Option,FlangOption]>,
+  HelpText<"Display available options">,
 MarshallingInfoFlag>;
 def ibuiltininc : Flag<["-"], "ibuiltininc">,
   HelpText<"Enable builtin #include directories even when -nostdinc is used "
@@ -6613,7 +6614,7 @@
 def _SLASH_Zp_flag : CLFlag<"Zp">,
   HelpText<"Set default maximum struct packing alignment to 1">,
   Alias, AliasArgs<["1"]>;
-def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Syntax-check only">,
+def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Run the preprocessor, parser and type 
checking stages">,
   Alias;
 def _SLASH_openmp_ : CLFlag<"openmp-">,
   HelpText<"Disable OpenMP support">, Alias;
Index: clang/docs/UsersManual.rst
===
--- clang/docs/UsersManual.rst
+++ clang/docs/UsersManual.rst
@@ -3999,7 +3999,7 @@
   /Zl Don't mention any default libraries in the 
object file
   /Zp Set the default maximum struct packing alignment 
to 1
   /Zp  Specify the default maximum struct packing 
alignment
-  /Zs Syntax-check only
+  /Zs Run the preprocessor, parser and type checking 
stages
 
 OPTIONS:
   -###   

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

2022-08-13 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof added inline comments.



Comment at: clang/include/clang/Driver/Options.td:2798-2799
 def fsyntax_only : Flag<["-"], "fsyntax-only">,
-  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option]>, Group;
+  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option,FlangOption]>, 
Group,
+  HelpText<"Syntax-check only">;
 def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group;

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



Comment at: clang/include/clang/Driver/Options.td:3213-3214
 def headerpad__max__install__names : Joined<["-"], 
"headerpad_max_install_names">;
-def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption, FC1Option,
-FlangOption]>, HelpText<"Display available options">,
+def help : Flag<["-", "--"], "help">, 
Flags<[CC1Option,CC1AsOption,FC1Option,FlangOption]>,
+  HelpText<"Display available options">,
 MarshallingInfoFlag>;

awarzynski wrote:
> Unrelated change?
yes, mini fix format.
If it bothers you, I can remove it


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131808

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2022-08-13 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof updated this revision to Diff 452429.
alexiprof added a comment.

this pull request contains a fix for the problem with displaying options 
-fsyntax_only in clang and fland-new in help
https://github.com/llvm/llvm-project/issues/57033

Before:

  $ clang  -help | grep syntax
   -objcmt-migrate-property-dot-syntax
  Enable migration of setter/getter messages to property-dot syntax

After:

  $ clang -help | grep syntax
   -fsyntax-only   Run the preprocessor, parser and type checking stages
   -objcmt-migrate-property-dot-syntax
  Enable migration of setter/getter messages to property-dot syntax

Differential Revision: https://reviews.llvm.org/D131808


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131808

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/UsersManual.rst
  clang/include/clang/Driver/Options.td
  flang/test/Driver/driver-help-hidden.f90
  flang/test/Driver/driver-help.f90


Index: flang/test/Driver/driver-help.f90
===
--- flang/test/Driver/driver-help.f90
+++ flang/test/Driver/driver-help.f90
@@ -42,6 +42,7 @@
 ! HELP-NEXT: -fno-integrated-as  Disable the integrated assembler
 ! HELP-NEXT: -fopenacc  Enable OpenACC
 ! HELP-NEXT: -fopenmp   Parse OpenMP pragmas and generate parallel 
code.
+! HELP-NEXT: -fsyntax-only  Run the preprocessor, parser and type 
checking stages
 ! HELP-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! HELP-NEXT: -help  Display available options
 ! HELP-NEXT: -IAdd directory to the end of the list of 
include search paths
@@ -119,6 +120,7 @@
 ! HELP-FC1-NEXT: -fno-reformat  Dump the cooked character stream in -E 
mode
 ! HELP-FC1-NEXT: -fopenacc  Enable OpenACC
 ! HELP-FC1-NEXT: -fopenmp   Parse OpenMP pragmas and generate 
parallel code.
+! HELP-FC1-NEXT: -fsyntax-only  Run the preprocessor, parser and type 
checking stages
 ! HELP-FC1-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! HELP-FC1-NEXT: -help  Display available options
 ! HELP-FC1-NEXT: -init-only Only execute frontend initialization
Index: flang/test/Driver/driver-help-hidden.f90
===
--- flang/test/Driver/driver-help-hidden.f90
+++ flang/test/Driver/driver-help-hidden.f90
@@ -44,6 +44,7 @@
 ! CHECK-NEXT: -fno-integrated-as Disable the integrated assembler
 ! CHECK-NEXT: -fopenacc  Enable OpenACC
 ! CHECK-NEXT: -fopenmp   Parse OpenMP pragmas and generate 
parallel code.
+! CHECK-NEXT: -fsyntax-only  Run the preprocessor, parser and type 
checking stages
 ! CHECK-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! CHECK-NEXT: -help Display available options
 ! CHECK-NEXT: -IAdd directory to the end of the list of 
include search paths
Index: clang/include/clang/Driver/Options.td
===
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -2795,7 +2795,8 @@
 def fdriver_only : Flag<["-"], "fdriver-only">, Flags<[NoXarchOption, 
CoreOption]>,
   Group, HelpText<"Only run the driver.">;
 def fsyntax_only : Flag<["-"], "fsyntax-only">,
-  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option]>, Group;
+  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option,FlangOption]>, 
Group,
+  HelpText<"Run the preprocessor, parser and type checking stages">;
 def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group;
 def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group;
 def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group;
@@ -3211,6 +3212,7 @@
 def headerpad__max__install__names : Joined<["-"], 
"headerpad_max_install_names">;
 def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption, FC1Option,
 FlangOption]>, HelpText<"Display available options">,
+  HelpText<"Display available options">,
 MarshallingInfoFlag>;
 def ibuiltininc : Flag<["-"], "ibuiltininc">,
   HelpText<"Enable builtin #include directories even when -nostdinc is used "
@@ -6613,7 +6615,7 @@
 def _SLASH_Zp_flag : CLFlag<"Zp">,
   HelpText<"Set default maximum struct packing alignment to 1">,
   Alias, AliasArgs<["1"]>;
-def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Syntax-check only">,
+def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Run the preprocessor, parser and type 
checking stages">,
   Alias;
 def _SLASH_openmp_ : CLFlag<"openmp-">,
   HelpText<"Disable OpenMP support">, Alias;
Index: clang/docs/UsersManual.rst
===
--- clang/docs/UsersManual.rst
+++ clang/docs/UsersManual.rst
@@ -3999,7 +3999,7 @@
   /Zl Don't mention any default libraries in the

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

2022-08-13 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof updated this revision to Diff 452431.
alexiprof added a comment.

remove Unrelated change


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131808

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/UsersManual.rst
  clang/include/clang/Driver/Options.td
  flang/test/Driver/driver-help-hidden.f90
  flang/test/Driver/driver-help.f90


Index: flang/test/Driver/driver-help.f90
===
--- flang/test/Driver/driver-help.f90
+++ flang/test/Driver/driver-help.f90
@@ -42,6 +42,7 @@
 ! HELP-NEXT: -fno-integrated-as  Disable the integrated assembler
 ! HELP-NEXT: -fopenacc  Enable OpenACC
 ! HELP-NEXT: -fopenmp   Parse OpenMP pragmas and generate parallel 
code.
+! HELP-NEXT: -fsyntax-only  Run the preprocessor, parser and type 
checking stages
 ! HELP-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! HELP-NEXT: -help  Display available options
 ! HELP-NEXT: -IAdd directory to the end of the list of 
include search paths
@@ -119,6 +120,7 @@
 ! HELP-FC1-NEXT: -fno-reformat  Dump the cooked character stream in -E 
mode
 ! HELP-FC1-NEXT: -fopenacc  Enable OpenACC
 ! HELP-FC1-NEXT: -fopenmp   Parse OpenMP pragmas and generate 
parallel code.
+! HELP-FC1-NEXT: -fsyntax-only  Run the preprocessor, parser and type 
checking stages
 ! HELP-FC1-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! HELP-FC1-NEXT: -help  Display available options
 ! HELP-FC1-NEXT: -init-only Only execute frontend initialization
Index: flang/test/Driver/driver-help-hidden.f90
===
--- flang/test/Driver/driver-help-hidden.f90
+++ flang/test/Driver/driver-help-hidden.f90
@@ -44,6 +44,7 @@
 ! CHECK-NEXT: -fno-integrated-as Disable the integrated assembler
 ! CHECK-NEXT: -fopenacc  Enable OpenACC
 ! CHECK-NEXT: -fopenmp   Parse OpenMP pragmas and generate 
parallel code.
+! CHECK-NEXT: -fsyntax-only  Run the preprocessor, parser and type 
checking stages
 ! CHECK-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! CHECK-NEXT: -help Display available options
 ! CHECK-NEXT: -IAdd directory to the end of the list of 
include search paths
Index: clang/include/clang/Driver/Options.td
===
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -2795,7 +2795,8 @@
 def fdriver_only : Flag<["-"], "fdriver-only">, Flags<[NoXarchOption, 
CoreOption]>,
   Group, HelpText<"Only run the driver.">;
 def fsyntax_only : Flag<["-"], "fsyntax-only">,
-  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option]>, Group;
+  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option,FlangOption]>, 
Group,
+  HelpText<"Run the preprocessor, parser and type checking stages">;
 def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group;
 def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group;
 def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group;
@@ -6613,7 +6614,7 @@
 def _SLASH_Zp_flag : CLFlag<"Zp">,
   HelpText<"Set default maximum struct packing alignment to 1">,
   Alias, AliasArgs<["1"]>;
-def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Syntax-check only">,
+def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Run the preprocessor, parser and type 
checking stages">,
   Alias;
 def _SLASH_openmp_ : CLFlag<"openmp-">,
   HelpText<"Disable OpenMP support">, Alias;
Index: clang/docs/UsersManual.rst
===
--- clang/docs/UsersManual.rst
+++ clang/docs/UsersManual.rst
@@ -3999,7 +3999,7 @@
   /Zl Don't mention any default libraries in the 
object file
   /Zp Set the default maximum struct packing alignment 
to 1
   /Zp  Specify the default maximum struct packing 
alignment
-  /Zs Syntax-check only
+  /Zs Run the preprocessor, parser and type checking 
stages
 
 OPTIONS:
   -###Print (but do not run) the commands to run for 
this compilation
@@ -4130,6 +4130,7 @@
   behavior. See user manual for available checks
   -fsplit-lto-unitEnables splitting of the LTO unit.
   -fstandalone-debug  Emit full debug info for all types used by the 
program
+  -fsyntax-only   Run the preprocessor, parser and type checking 
stages
   -fwhole-program-vtables Enables whole-program vtable optimization. 
Requires -flto
   -gcodeview-ghashEmit type record hashes in a .debug$H section
   -gcodeview  Generate CodeView debug information
Index: clang/docs/ClangCommandLineRe

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

2022-08-13 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof added a comment.

I do not have commit access, i do not have merge :-(


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131808

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2022-08-14 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof updated this revision to Diff 452487.
alexiprof added a comment.

replase text hint


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131808

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/CommandGuide/clang.rst
  clang/docs/UsersManual.rst
  clang/include/clang/Driver/Options.td
  flang/test/Driver/driver-help-hidden.f90
  flang/test/Driver/driver-help.f90

Index: flang/test/Driver/driver-help.f90
===
--- flang/test/Driver/driver-help.f90
+++ flang/test/Driver/driver-help.f90
@@ -42,6 +42,7 @@
 ! HELP-NEXT: -fno-integrated-as  Disable the integrated assembler
 ! HELP-NEXT: -fopenacc  Enable OpenACC
 ! HELP-NEXT: -fopenmp   Parse OpenMP pragmas and generate parallel code.
+! HELP-NEXT: -fsyntax-only  Run the preprocessor, parser and semantic analysis stages
 ! HELP-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! HELP-NEXT: -help  Display available options
 ! HELP-NEXT: -IAdd directory to the end of the list of include search paths
@@ -119,6 +120,7 @@
 ! HELP-FC1-NEXT: -fno-reformat  Dump the cooked character stream in -E mode
 ! HELP-FC1-NEXT: -fopenacc  Enable OpenACC
 ! HELP-FC1-NEXT: -fopenmp   Parse OpenMP pragmas and generate parallel code.
+! HELP-FC1-NEXT: -fsyntax-only  Run the preprocessor, parser and semantic analysis stages
 ! HELP-FC1-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! HELP-FC1-NEXT: -help  Display available options
 ! HELP-FC1-NEXT: -init-only Only execute frontend initialization
Index: flang/test/Driver/driver-help-hidden.f90
===
--- flang/test/Driver/driver-help-hidden.f90
+++ flang/test/Driver/driver-help-hidden.f90
@@ -44,6 +44,7 @@
 ! CHECK-NEXT: -fno-integrated-as Disable the integrated assembler
 ! CHECK-NEXT: -fopenacc  Enable OpenACC
 ! CHECK-NEXT: -fopenmp   Parse OpenMP pragmas and generate parallel code.
+! CHECK-NEXT: -fsyntax-only  Run the preprocessor, parser and semantic analysis stages
 ! CHECK-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
 ! CHECK-NEXT: -help Display available options
 ! CHECK-NEXT: -IAdd directory to the end of the list of include search paths
Index: clang/include/clang/Driver/Options.td
===
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -2795,7 +2795,8 @@
 def fdriver_only : Flag<["-"], "fdriver-only">, Flags<[NoXarchOption, CoreOption]>,
   Group, HelpText<"Only run the driver.">;
 def fsyntax_only : Flag<["-"], "fsyntax-only">,
-  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option]>, Group;
+  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option,FlangOption]>, Group,
+  HelpText<"Run the preprocessor, parser and semantic analysis stages">;
 def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group;
 def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group;
 def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group;
@@ -6613,7 +6614,7 @@
 def _SLASH_Zp_flag : CLFlag<"Zp">,
   HelpText<"Set default maximum struct packing alignment to 1">,
   Alias, AliasArgs<["1"]>;
-def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Syntax-check only">,
+def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Run the preprocessor, parser and semantic analysis stages">,
   Alias;
 def _SLASH_openmp_ : CLFlag<"openmp-">,
   HelpText<"Disable OpenMP support">, Alias;
Index: clang/docs/UsersManual.rst
===
--- clang/docs/UsersManual.rst
+++ clang/docs/UsersManual.rst
@@ -3999,7 +3999,7 @@
   /Zl Don't mention any default libraries in the object file
   /Zp Set the default maximum struct packing alignment to 1
   /Zp  Specify the default maximum struct packing alignment
-  /Zs Syntax-check only
+  /Zs Run the preprocessor, parser and semantic analysis stages
 
 OPTIONS:
   -###Print (but do not run) the commands to run for this compilation
@@ -4130,6 +4130,7 @@
   behavior. See user manual for available checks
   -fsplit-lto-unitEnables splitting of the LTO unit.
   -fstandalone-debug  Emit full debug info for all types used by the program
+  -fsyntax-only   Run the preprocessor, parser and semantic analysis stages
   -fwhole-program-vtables Enables whole-program vtable optimization. Requires -flto
   -gcodeview-ghashEmit type record hashes in a .debug$H section
   -gcodeview  Generate CodeView debug information

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

2022-08-15 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof added a comment.

I can't merge the changes((


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131808

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2022-08-15 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof added a comment.

Could someone land this patch please?
Alexander Malkov 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131808

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D131808: [clang,flang] Add help text for -fsyntax-only

2022-08-19 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof added a comment.

ping
@awarzynski @MaskRay @vzakhari


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131808

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits