diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -3391,7 +3391,7 @@ def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption, FC1Option, FlangOption]>, HelpText<"Display available options">, MarshallingInfoFlag>; -def ibuiltininc : Flag<["-"], "ibuiltininc">, +def ibuiltininc : Flag<["-"], "ibuiltininc">, Group, HelpText<"Enable builtin #include directories even when -nostdinc is used " "before or after -ibuiltininc. " "Using -nobuiltininc after the option disables it">; @@ -4197,9 +4197,10 @@ def nobuiltininc : Flag<["-"], "nobuiltininc">, Flags<[CC1Option, CoreOption]>, HelpText<"Disable builtin #include directories">, MarshallingInfoNegativeFlag>; -def nogpuinc : Flag<["-"], "nogpuinc">, HelpText<"Do not add include paths for CUDA/HIP and" +def nogpuinc : Flag<["-"], "nogpuinc">, Group, + HelpText<"Do not add include paths for CUDA/HIP and" " do not include the default CUDA/HIP wrapper headers">; -def nohipwrapperinc : Flag<["-"], "nohipwrapperinc">, +def nohipwrapperinc : Flag<["-"], "nohipwrapperinc">, Group, HelpText<"Do not include the default HIP wrapper headers and include paths">; def : Flag<["-"], "nocudainc">, Alias; def nogpulib : Flag<["-"], "nogpulib">, MarshallingInfoFlag>, @@ -4216,9 +4217,9 @@ def noprofilelib : Flag<["-"], "noprofilelib">; def noseglinkedit : Flag<["-"], "noseglinkedit">; def nostartfiles : Flag<["-"], "nostartfiles">, Group; -def nostdinc : Flag<["-"], "nostdinc">, Flags<[CoreOption]>; -def nostdlibinc : Flag<["-"], "nostdlibinc">; -def nostdincxx : Flag<["-"], "nostdinc++">, Flags<[CC1Option]>, +def nostdinc : Flag<["-"], "nostdinc">, Flags<[CoreOption]>, Group; +def nostdlibinc : Flag<["-"], "nostdlibinc">, Group; +def nostdincxx : Flag<["-"], "nostdinc++">, Flags<[CC1Option]>, Group, HelpText<"Disable standard #include directories for the C++ standard library">, MarshallingInfoNegativeFlag>; def nostdlib : Flag<["-"], "nostdlib">, Group; diff --git a/clang/test/Driver/linker-opts.c b/clang/test/Driver/linker-opts.c --- a/clang/test/Driver/linker-opts.c +++ b/clang/test/Driver/linker-opts.c @@ -15,7 +15,7 @@ // // Make sure that we don't warn on unused compiler arguments. // RUN: %clang -Xclang -I. -x c %s -c -o %t/tmp.o -// RUN: %clang -Xclang -I. %t/tmp.o -o %t/tmp -### 2>&1 | FileCheck %s --check-prefix=NO-UNUSED +// RUN: %clang -I. -ibuiltininc -nostdinc -nostdinc++ -nostdlibinc -nogpuinc -Xclang -I. %t/tmp.o -o %t/tmp -### 2>&1 | FileCheck %s --check-prefix=NO-UNUSED // NO-UNUSED-NOT: warning:{{.*}}unused // // Make sure that we do warn in other cases.