Index: clang/include/clang/Driver/Options.td =================================================================== --- clang/include/clang/Driver/Options.td +++ clang/include/clang/Driver/Options.td @@ -826,7 +826,7 @@ HelpText<"Pass to the linker">, MetaVarName<"">, Group; def Xoffload_linker : JoinedAndSeparate<["-"], "Xoffload-linker">, - HelpText<"Pass to the offload linkers or the ones idenfied by -">, + HelpText<"Pass to the offload linkers or the ones idenfied by -">, MetaVarName<" ">, Group; def Xpreprocessor : Separate<["-"], "Xpreprocessor">, Group, HelpText<"Pass to the preprocessor">, MetaVarName<"">; @@ -3996,6 +3996,8 @@ HelpText<"Print the paths used for finding ROCm installation">; def print_runtime_dir : Flag<["-", "--"], "print-runtime-dir">, HelpText<"Print the directory pathname containing clangs runtime libraries">; +def print_diagnostic_options : Flag<["-", "--"], "print-diagnostic-options">, + HelpText<"Print all of Clang's warning options">; def private__bundle : Flag<["-"], "private_bundle">; def pthreads : Flag<["-"], "pthreads">; defm pthread : BoolOption<"", "pthread", Index: clang/lib/Driver/Driver.cpp =================================================================== --- clang/lib/Driver/Driver.cpp +++ clang/lib/Driver/Driver.cpp @@ -2006,6 +2006,25 @@ return false; } + if (C.getArgs().hasArg(options::OPT_print_diagnostic_options)) { + std::vector Diags; + DiagnosticIDs::getAllDiagnostics(diag::Flavor::WarningOrError, Diags); + + std::vector Flags = DiagnosticIDs::getDiagnosticFlags(); + Flags.reserve(Diags.size()); + for (diag::kind D : Diags) { + Flags.emplace_back( + "-W" + std::string(DiagnosticIDs::getWarningOptionForDiag(D))); + } + llvm::sort(Flags); + llvm::erase_if(Flags, + [](StringRef Flag) { return Flag.startswith("-Wno-"); }); + Flags.erase(llvm::unique(Flags, std::equal_to<>()), Flags.end()); + for (StringRef Flag : Flags) + llvm::outs() << " " << Flag << '\n'; + return false; + } + // FIXME: The following handlers should use a callback mechanism, we don't // know what the client would like to do. if (Arg *A = C.getArgs().getLastArg(options::OPT_print_file_name_EQ)) { Index: clang/test/Driver/print-diagnostic-options.c =================================================================== --- /dev/null +++ clang/test/Driver/print-diagnostic-options.c @@ -0,0 +1,935 @@ +// Test that -print-diagnostic-options prints all warning groups + +// RUN: %clang -print-diagnostic-options 2>&1 >%t +// RUN: FileCheck %s --input-file=%t + +// CHECK: -W +// CHECK: -W#pragma-messages +// CHECK: -W#warnings +// CHECK: -WCFString-literal +// CHECK: -WCL4 +// CHECK: -WIndependentClass-attribute +// CHECK: -WNSObject-attribute +// CHECK: -Wabi +// CHECK: -Wabsolute-value +// CHECK: -Wabstract-final-class +// CHECK: -Wabstract-vbase-init +// CHECK: -Waddress +// CHECK: -Waddress-of-packed-member +// CHECK: -Waddress-of-temporary +// CHECK: -Waggregate-return +// CHECK: -Waix-compat +// CHECK: -Walign-mismatch +// CHECK: -Wall +// CHECK: -Walloca +// CHECK: -Walloca-with-align-alignof +// CHECK: -Walways-inline-coroutine +// CHECK: -Wambiguous-delete +// CHECK: -Wambiguous-ellipsis +// CHECK: -Wambiguous-macro +// CHECK: -Wambiguous-member-template +// CHECK: -Wambiguous-reversed-operator +// CHECK: -Wanalyzer-incompatible-plugin +// CHECK: -Wanon-enum-enum-conversion +// CHECK: -Wanonymous-pack-parens +// CHECK: -Warc +// CHECK: -Warc-bridge-casts-disallowed-in-nonarc +// CHECK: -Warc-maybe-repeated-use-of-weak +// CHECK: -Warc-non-pod-memaccess +// CHECK: -Warc-performSelector-leaks +// CHECK: -Warc-repeated-use-of-weak +// CHECK: -Warc-retain-cycles +// CHECK: -Warc-unsafe-retained-assign +// CHECK: -Wargument-outside-range +// CHECK: -Wargument-undefined-behaviour +// CHECK: -Warray-bounds +// CHECK: -Warray-bounds-pointer-arithmetic +// CHECK: -Wasm +// CHECK: -Wasm-operand-widths +// CHECK: -Wassign-enum +// CHECK: -Wassume +// CHECK: -Wat-protocol +// CHECK: -Watimport-in-framework-header +// CHECK: -Watomic-access +// CHECK: -Watomic-alignment +// CHECK: -Watomic-implicit-seq-cst +// CHECK: -Watomic-memory-ordering +// CHECK: -Watomic-properties +// CHECK: -Watomic-property-with-user-defined-accessor +// CHECK: -Wattribute-packed-for-bitfield +// CHECK: -Wattribute-warning +// CHECK: -Wattributes +// CHECK: -Wauto-disable-vptr-sanitizer +// CHECK: -Wauto-import +// CHECK: -Wauto-storage-class +// CHECK: -Wauto-var-id +// CHECK: -Wavailability +// CHECK: -Wavr-rtlib-linking-quirks +// CHECK: -Wbackend-plugin +// CHECK: -Wbackslash-newline-escape +// CHECK: -Wbad-function-cast +// CHECK: -Wbinary-literal +// CHECK: -Wbind-to-temporary-copy +// CHECK: -Wbinding-in-condition +// CHECK: -Wbit-int-extension +// CHECK: -Wbitfield-constant-conversion +// CHECK: -Wbitfield-enum-conversion +// CHECK: -Wbitfield-width +// CHECK: -Wbitwise-conditional-parentheses +// CHECK: -Wbitwise-instead-of-logical +// CHECK: -Wbitwise-op-parentheses +// CHECK: -Wblock-capture-autoreleasing +// CHECK: -Wbool-conversion +// CHECK: -Wbool-conversions +// CHECK: -Wbool-operation +// CHECK: -Wbraced-scalar-init +// CHECK: -Wbranch-protection +// CHECK: -Wbridge-cast +// CHECK: -Wbuiltin-assume-aligned-alignment +// CHECK: -Wbuiltin-macro-redefined +// CHECK: -Wbuiltin-memcpy-chk-size +// CHECK: -Wbuiltin-requires-header +// CHECK: -Wc++-compat +// CHECK: -Wc++0x-compat +// CHECK: -Wc++0x-extensions +// CHECK: -Wc++0x-narrowing +// CHECK: -Wc++11-compat +// CHECK: -Wc++11-compat-deprecated-writable-strings +// CHECK: -Wc++11-compat-pedantic +// CHECK: -Wc++11-compat-reserved-user-defined-literal +// CHECK: -Wc++11-extensions +// CHECK: -Wc++11-extra-semi +// CHECK: -Wc++11-inline-namespace +// CHECK: -Wc++11-long-long +// CHECK: -Wc++11-narrowing +// CHECK: -Wc++14-attribute-extensions +// CHECK: -Wc++14-binary-literal +// CHECK: -Wc++14-compat +// CHECK: -Wc++14-compat-pedantic +// CHECK: -Wc++14-extensions +// CHECK: -Wc++17-attribute-extensions +// CHECK: -Wc++17-compat +// CHECK: -Wc++17-compat-mangling +// CHECK: -Wc++17-compat-pedantic +// CHECK: -Wc++17-extensions +// CHECK: -Wc++1y-extensions +// CHECK: -Wc++1z-compat +// CHECK: -Wc++1z-compat-mangling +// CHECK: -Wc++1z-extensions +// CHECK: -Wc++20-attribute-extensions +// CHECK: -Wc++20-compat +// CHECK: -Wc++20-compat-pedantic +// CHECK: -Wc++20-designator +// CHECK: -Wc++20-extensions +// CHECK: -Wc++2a-compat +// CHECK: -Wc++2a-compat-pedantic +// CHECK: -Wc++2a-extensions +// CHECK: -Wc++2b-extensions +// CHECK: -Wc++98-c++11-c++14-c++17-compat +// CHECK: -Wc++98-c++11-c++14-c++17-compat-pedantic +// CHECK: -Wc++98-c++11-c++14-compat +// CHECK: -Wc++98-c++11-c++14-compat-pedantic +// CHECK: -Wc++98-c++11-compat +// CHECK: -Wc++98-c++11-compat-binary-literal +// CHECK: -Wc++98-c++11-compat-pedantic +// CHECK: -Wc++98-compat +// CHECK: -Wc++98-compat-bind-to-temporary-copy +// CHECK: -Wc++98-compat-extra-semi +// CHECK: -Wc++98-compat-local-type-template-args +// CHECK: -Wc++98-compat-pedantic +// CHECK: -Wc++98-compat-unnamed-type-template-args +// CHECK: -Wc11-extensions +// CHECK: -Wc2x-extensions +// CHECK: -Wc99-compat +// CHECK: -Wc99-designator +// CHECK: -Wc99-extensions +// CHECK: -Wcall-to-pure-virtual-from-ctor-dtor +// CHECK: -Wcalled-once-parameter +// CHECK: -Wcast-align +// CHECK: -Wcast-calling-convention +// CHECK: -Wcast-function-type +// CHECK: -Wcast-of-sel-type +// CHECK: -Wcast-qual +// CHECK: -Wcast-qual-unrelated +// CHECK: -Wchar-align +// CHECK: -Wchar-subscripts +// CHECK: -Wclang-cl-pch +// CHECK: -Wclass-conversion +// CHECK: -Wclass-varargs +// CHECK: -Wcmse-union-leak +// CHECK: -Wcomma +// CHECK: -Wcomment +// CHECK: -Wcomments +// CHECK: -Wcompare-distinct-pointer-types +// CHECK: -Wcompletion-handler +// CHECK: -Wcomplex-component-init +// CHECK: -Wcompound-token-split +// CHECK: -Wcompound-token-split-by-macro +// CHECK: -Wcompound-token-split-by-space +// CHECK: -Wconcepts-ts-compat +// CHECK: -Wconditional-type-mismatch +// CHECK: -Wconditional-uninitialized +// CHECK: -Wconfig-macros +// CHECK: -Wconstant-conversion +// CHECK: -Wconstant-evaluated +// CHECK: -Wconstant-logical-operand +// CHECK: -Wconstexpr-not-const +// CHECK: -Wconsumed +// CHECK: -Wconversion +// CHECK: -Wconversion-null +// CHECK: -Wcoroutine +// CHECK: -Wcoroutine-missing-unhandled-exception +// CHECK: -Wcovered-switch-default +// CHECK: -Wcpp +// CHECK: -Wcstring-format-directive +// CHECK: -Wctad-maybe-unsupported +// CHECK: -Wctor-dtor-privacy +// CHECK: -Wctu +// CHECK: -Wcuda-compat +// CHECK: -Wcustom-atomic-properties +// CHECK: -Wcxx-attribute-extension +// CHECK: -Wdangling +// CHECK: -Wdangling-else +// CHECK: -Wdangling-field +// CHECK: -Wdangling-gsl +// CHECK: -Wdangling-initializer-list +// CHECK: -Wdarwin-sdk-settings +// CHECK: -Wdate-time +// CHECK: -Wdealloc-in-category +// CHECK: -Wdebug-compression-unavailable +// CHECK: -Wdeclaration-after-statement +// CHECK: -Wdefaulted-function-deleted +// CHECK: -Wdelegating-ctor-cycles +// CHECK: -Wdelete-abstract-non-virtual-dtor +// CHECK: -Wdelete-incomplete +// CHECK: -Wdelete-non-abstract-non-virtual-dtor +// CHECK: -Wdelete-non-virtual-dtor +// CHECK: -Wdelimited-escape-sequence-extension +// CHECK: -Wdeprecated +// CHECK: -Wdeprecated-altivec-src-compat +// CHECK: -Wdeprecated-anon-enum-enum-conversion +// CHECK: -Wdeprecated-array-compare +// CHECK: -Wdeprecated-attributes +// CHECK: -Wdeprecated-comma-subscript +// CHECK: -Wdeprecated-copy +// CHECK: -Wdeprecated-copy-dtor +// CHECK: -Wdeprecated-copy-with-dtor +// CHECK: -Wdeprecated-copy-with-user-provided-copy +// CHECK: -Wdeprecated-copy-with-user-provided-dtor +// CHECK: -Wdeprecated-coroutine +// CHECK: -Wdeprecated-declarations +// CHECK: -Wdeprecated-dynamic-exception-spec +// CHECK: -Wdeprecated-enum-compare +// CHECK: -Wdeprecated-enum-compare-conditional +// CHECK: -Wdeprecated-enum-enum-conversion +// CHECK: -Wdeprecated-enum-float-conversion +// CHECK: -Wdeprecated-experimental-coroutine +// CHECK: -Wdeprecated-implementations +// CHECK: -Wdeprecated-increment-bool +// CHECK: -Wdeprecated-non-prototype +// CHECK: -Wdeprecated-objc-isa-usage +// CHECK: -Wdeprecated-objc-pointer-introspection +// CHECK: -Wdeprecated-objc-pointer-introspection-performSelector +// CHECK: -Wdeprecated-pragma +// CHECK: -Wdeprecated-register +// CHECK: -Wdeprecated-this-capture +// CHECK: -Wdeprecated-type +// CHECK: -Wdeprecated-volatile +// CHECK: -Wdeprecated-writable-strings +// CHECK: -Wdirect-ivar-access +// CHECK: -Wdisabled-macro-expansion +// CHECK: -Wdisabled-optimization +// CHECK: -Wdiscard-qual +// CHECK: -Wdistributed-object-modifiers +// CHECK: -Wdiv-by-zero +// CHECK: -Wdivision-by-zero +// CHECK: -Wdll-attribute-on-redeclaration +// CHECK: -Wdllexport-explicit-instantiation-decl +// CHECK: -Wdllimport-static-field-def +// CHECK: -Wdocumentation +// CHECK: -Wdocumentation-deprecated-sync +// CHECK: -Wdocumentation-html +// CHECK: -Wdocumentation-pedantic +// CHECK: -Wdocumentation-unknown-command +// CHECK: -Wdollar-in-identifier-extension +// CHECK: -Wdouble-promotion +// CHECK: -Wdtor-name +// CHECK: -Wdtor-typedef +// CHECK: -Wduplicate-decl-specifier +// CHECK: -Wduplicate-enum +// CHECK: -Wduplicate-method-arg +// CHECK: -Wduplicate-method-match +// CHECK: -Wduplicate-protocol +// CHECK: -Wdynamic-class-memaccess +// CHECK: -Wdynamic-exception-spec +// CHECK: -Weffc++ +// CHECK: -Welaborated-enum-base +// CHECK: -Welaborated-enum-class +// CHECK: -Wembedded-directive +// CHECK: -Wempty-body +// CHECK: -Wempty-decomposition +// CHECK: -Wempty-init-stmt +// CHECK: -Wempty-translation-unit +// CHECK: -Wencode-type +// CHECK: -Wendif-labels +// CHECK: -Wenum-compare +// CHECK: -Wenum-compare-conditional +// CHECK: -Wenum-compare-switch +// CHECK: -Wenum-conversion +// CHECK: -Wenum-enum-conversion +// CHECK: -Wenum-float-conversion +// CHECK: -Wenum-too-large +// CHECK: -Wexceptions +// CHECK: -Wexcess-initializers +// CHECK: -Wexit-time-destructors +// CHECK: -Wexpansion-to-defined +// CHECK: -Wexplicit-initialize-call +// CHECK: -Wexplicit-ownership-type +// CHECK: -Wexport-unnamed +// CHECK: -Wexport-using-directive +// CHECK: -Wextern-c-compat +// CHECK: -Wextern-initializer +// CHECK: -Wextra +// CHECK: -Wextra-qualification +// CHECK: -Wextra-semi +// CHECK: -Wextra-semi-stmt +// CHECK: -Wextra-tokens +// CHECK: -Wfinal-dtor-non-final-class +// CHECK: -Wfinal-macro +// CHECK: -Wfixed-enum-extension +// CHECK: -Wfixed-point-overflow +// CHECK: -Wflag-enum +// CHECK: -Wflexible-array-extensions +// CHECK: -Wfloat-conversion +// CHECK: -Wfloat-equal +// CHECK: -Wfloat-overflow-conversion +// CHECK: -Wfloat-zero-conversion +// CHECK: -Wfor-loop-analysis +// CHECK: -Wformat +// CHECK: -Wformat-extra-args +// CHECK: -Wformat-insufficient-args +// CHECK: -Wformat-invalid-specifier +// CHECK: -Wformat-non-iso +// CHECK: -Wformat-nonliteral +// CHECK: -Wformat-pedantic +// CHECK: -Wformat-security +// CHECK: -Wformat-type-confusion +// CHECK: -Wformat-y2k +// CHECK: -Wformat-zero-length +// CHECK: -Wformat=2 +// CHECK: -Wfortify-source +// CHECK: -Wfour-char-constants +// CHECK: -Wframe-address +// CHECK: -Wframe-larger-than +// CHECK: -Wframe-larger-than= +// CHECK: -Wframework-include-private-from-public +// CHECK: -Wfree-nonheap-object +// CHECK: -Wfunction-def-in-objc-container +// CHECK: -Wfunction-multiversion +// CHECK: -Wfuse-ld-path +// CHECK: -Wfuture-attribute-extensions +// CHECK: -Wfuture-compat +// CHECK: -Wgcc-compat +// CHECK: -Wglobal-constructors +// CHECK: -Wglobal-isel +// CHECK: -Wgnu +// CHECK: -Wgnu-alignof-expression +// CHECK: -Wgnu-anonymous-struct +// CHECK: -Wgnu-array-member-paren-init +// CHECK: -Wgnu-auto-type +// CHECK: -Wgnu-binary-literal +// CHECK: -Wgnu-case-range +// CHECK: -Wgnu-complex-integer +// CHECK: -Wgnu-compound-literal-initializer +// CHECK: -Wgnu-conditional-omitted-operand +// CHECK: -Wgnu-designator +// CHECK: -Wgnu-empty-initializer +// CHECK: -Wgnu-empty-struct +// CHECK: -Wgnu-flexible-array-initializer +// CHECK: -Wgnu-flexible-array-union-member +// CHECK: -Wgnu-folding-constant +// CHECK: -Wgnu-imaginary-constant +// CHECK: -Wgnu-include-next +// CHECK: -Wgnu-inline-cpp-without-extern +// CHECK: -Wgnu-label-as-value +// CHECK: -Wgnu-line-marker +// CHECK: -Wgnu-null-pointer-arithmetic +// CHECK: -Wgnu-pointer-arith +// CHECK: -Wgnu-redeclared-enum +// CHECK: -Wgnu-statement-expression +// CHECK: -Wgnu-static-float-init +// CHECK: -Wgnu-string-literal-operator-template +// CHECK: -Wgnu-union-cast +// CHECK: -Wgnu-variable-sized-type-not-at-end +// CHECK: -Wgnu-zero-line-directive +// CHECK: -Wgnu-zero-variadic-macro-arguments +// CHECK: -Wgpu-maybe-wrong-side +// CHECK: -Wheader-guard +// CHECK: -Wheader-hygiene +// CHECK: -Whip-only +// CHECK: -Whlsl-extensions +// CHECK: -Widiomatic-parentheses +// CHECK: -Wignored-attributes +// CHECK: -Wignored-availability-without-sdk-settings +// CHECK: -Wignored-optimization-argument +// CHECK: -Wignored-pragma-intrinsic +// CHECK: -Wignored-pragma-optimize +// CHECK: -Wignored-pragmas +// CHECK: -Wignored-qualifiers +// CHECK: -Wignored-reference-qualifiers +// CHECK: -Wimplicit +// CHECK: -Wimplicit-atomic-properties +// CHECK: -Wimplicit-const-int-float-conversion +// CHECK: -Wimplicit-conversion-floating-point-to-bool +// CHECK: -Wimplicit-exception-spec-mismatch +// CHECK: -Wimplicit-fallthrough +// CHECK: -Wimplicit-fallthrough-per-function +// CHECK: -Wimplicit-fixed-point-conversion +// CHECK: -Wimplicit-float-conversion +// CHECK: -Wimplicit-function-declaration +// CHECK: -Wimplicit-int +// CHECK: -Wimplicit-int-conversion +// CHECK: -Wimplicit-int-float-conversion +// CHECK: -Wimplicit-retain-self +// CHECK: -Wimplicitly-unsigned-literal +// CHECK: -Wimport +// CHECK: -Wimport-preprocessor-directive-pedantic +// CHECK: -Winaccessible-base +// CHECK: -Winclude-next-absolute-path +// CHECK: -Winclude-next-outside-header +// CHECK: -Wincompatible-exception-spec +// CHECK: -Wincompatible-function-pointer-types +// CHECK: -Wincompatible-library-redeclaration +// CHECK: -Wincompatible-ms-struct +// CHECK: -Wincompatible-pointer-types +// CHECK: -Wincompatible-pointer-types-discards-qualifiers +// CHECK: -Wincompatible-property-type +// CHECK: -Wincompatible-sysroot +// CHECK: -Wincomplete-framework-module-declaration +// CHECK: -Wincomplete-implementation +// CHECK: -Wincomplete-module +// CHECK: -Wincomplete-setjmp-declaration +// CHECK: -Wincomplete-umbrella +// CHECK: -Winconsistent-dllimport +// CHECK: -Winconsistent-missing-destructor-override +// CHECK: -Winconsistent-missing-override +// CHECK: -Wincrement-bool +// CHECK: -Winfinite-recursion +// CHECK: -Winit-self +// CHECK: -Winitializer-overrides +// CHECK: -Winjected-class-name +// CHECK: -Winline +// CHECK: -Winline-asm +// CHECK: -Winline-namespace-reopened-noninline +// CHECK: -Winline-new-delete +// CHECK: -Winstantiation-after-specialization +// CHECK: -Wint-conversion +// CHECK: -Wint-conversions +// CHECK: -Wint-in-bool-context +// CHECK: -Wint-to-pointer-cast +// CHECK: -Wint-to-void-pointer-cast +// CHECK: -Winteger-overflow +// CHECK: -Winterrupt-service-routine +// CHECK: -Winvalid-command-line-argument +// CHECK: -Winvalid-constexpr +// CHECK: -Winvalid-iboutlet +// CHECK: -Winvalid-initializer-from-system-header +// CHECK: -Winvalid-ios-deployment-target +// CHECK: -Winvalid-no-builtin-names +// CHECK: -Winvalid-noreturn +// CHECK: -Winvalid-offsetof +// CHECK: -Winvalid-or-nonexistent-directory +// CHECK: -Winvalid-partial-specialization +// CHECK: -Winvalid-pch +// CHECK: -Winvalid-pp-token +// CHECK: -Winvalid-source-encoding +// CHECK: -Winvalid-token-paste +// CHECK: -Wjump-seh-finally +// CHECK: -Wkeyword-compat +// CHECK: -Wkeyword-macro +// CHECK: -Wknr-promoted-parameter +// CHECK: -Wlanguage-extension-token +// CHECK: -Wlarge-by-value-copy +// CHECK: -Wliblto +// CHECK: -Wlinker-warnings +// CHECK: -Wliteral-conversion +// CHECK: -Wliteral-range +// CHECK: -Wlocal-type-template-args +// CHECK: -Wlogical-not-parentheses +// CHECK: -Wlogical-op-parentheses +// CHECK: -Wlong-long +// CHECK: -Wloop-analysis +// CHECK: -Wmacro-redefined +// CHECK: -Wmain +// CHECK: -Wmain-return-type +// CHECK: -Wmalformed-warning-check +// CHECK: -Wmany-braces-around-scalar-init +// CHECK: -Wmax-tokens +// CHECK: -Wmax-unsigned-zero +// CHECK: -Wmemset-transposed-args +// CHECK: -Wmemsize-comparison +// CHECK: -Wmethod-signatures +// CHECK: -Wmicrosoft +// CHECK: -Wmicrosoft-abstract +// CHECK: -Wmicrosoft-anon-tag +// CHECK: -Wmicrosoft-cast +// CHECK: -Wmicrosoft-charize +// CHECK: -Wmicrosoft-comment-paste +// CHECK: -Wmicrosoft-const-init +// CHECK: -Wmicrosoft-cpp-macro +// CHECK: -Wmicrosoft-default-arg-redefinition +// CHECK: -Wmicrosoft-drectve-section +// CHECK: -Wmicrosoft-end-of-file +// CHECK: -Wmicrosoft-enum-forward-reference +// CHECK: -Wmicrosoft-enum-value +// CHECK: -Wmicrosoft-exception-spec +// CHECK: -Wmicrosoft-exists +// CHECK: -Wmicrosoft-explicit-constructor-call +// CHECK: -Wmicrosoft-extra-qualification +// CHECK: -Wmicrosoft-fixed-enum +// CHECK: -Wmicrosoft-flexible-array +// CHECK: -Wmicrosoft-goto +// CHECK: -Wmicrosoft-inaccessible-base +// CHECK: -Wmicrosoft-include +// CHECK: -Wmicrosoft-mutable-reference +// CHECK: -Wmicrosoft-pure-definition +// CHECK: -Wmicrosoft-redeclare-static +// CHECK: -Wmicrosoft-sealed +// CHECK: -Wmicrosoft-static-assert +// CHECK: -Wmicrosoft-template +// CHECK: -Wmicrosoft-template-shadow +// CHECK: -Wmicrosoft-union-member-reference +// CHECK: -Wmicrosoft-unqualified-friend +// CHECK: -Wmicrosoft-using-decl +// CHECK: -Wmicrosoft-void-pseudo-dtor +// CHECK: -Wmisexpect +// CHECK: -Wmisleading-indentation +// CHECK: -Wmismatched-new-delete +// CHECK: -Wmismatched-parameter-types +// CHECK: -Wmismatched-return-types +// CHECK: -Wmismatched-tags +// CHECK: -Wmissing-braces +// CHECK: -Wmissing-constinit +// CHECK: -Wmissing-declarations +// CHECK: -Wmissing-exception-spec +// CHECK: -Wmissing-field-initializers +// CHECK: -Wmissing-format-attribute +// CHECK: -Wmissing-include-dirs +// CHECK: -Wmissing-method-return-type +// CHECK: -Wmissing-noescape +// CHECK: -Wmissing-noreturn +// CHECK: -Wmissing-prototype-for-cc +// CHECK: -Wmissing-prototypes +// CHECK: -Wmissing-selector-name +// CHECK: -Wmissing-sysroot +// CHECK: -Wmissing-variable-declarations +// CHECK: -Wmisspelled-assumption +// CHECK: -Wmodule-conflict +// CHECK: -Wmodule-file-config-mismatch +// CHECK: -Wmodule-file-extension +// CHECK: -Wmodule-import-in-extern-c +// CHECK: -Wmodules-ambiguous-internal-linkage +// CHECK: -Wmodules-import-nested-redundant +// CHECK: -Wmost +// CHECK: -Wmove +// CHECK: -Wmsvc-include +// CHECK: -Wmsvc-not-found +// CHECK: -Wmultichar +// CHECK: -Wmultiple-move-vbase +// CHECK: -Wnarrowing +// CHECK: -Wnested-anon-types +// CHECK: -Wnested-externs +// CHECK: -Wnew-returns-null +// CHECK: -Wnewline-eof +// CHECK: -Wnoderef +// CHECK: -Wnoexcept-type +// CHECK: -Wnon-c-typedef-for-linkage +// CHECK: -Wnon-gcc +// CHECK: -Wnon-literal-null-conversion +// CHECK: -Wnon-modular-include-in-framework-module +// CHECK: -Wnon-modular-include-in-module +// CHECK: -Wnon-pod-varargs +// CHECK: -Wnon-power-of-two-alignment +// CHECK: -Wnon-virtual-dtor +// CHECK: -Wnonnull +// CHECK: -Wnonportable-cfstrings +// CHECK: -Wnonportable-include-path +// CHECK: -Wnonportable-system-include-path +// CHECK: -Wnonportable-vector-initialization +// CHECK: -Wnontrivial-memaccess +// CHECK: -Wnsconsumed-mismatch +// CHECK: -Wnsreturns-mismatch +// CHECK: -Wnull-arithmetic +// CHECK: -Wnull-character +// CHECK: -Wnull-conversion +// CHECK: -Wnull-dereference +// CHECK: -Wnull-pointer-arithmetic +// CHECK: -Wnull-pointer-subtraction +// CHECK: -Wnullability +// CHECK: -Wnullability-completeness +// CHECK: -Wnullability-completeness-on-arrays +// CHECK: -Wnullability-declspec +// CHECK: -Wnullability-extension +// CHECK: -Wnullability-inferred-on-nested-type +// CHECK: -Wnullable-to-nonnull-conversion +// CHECK: -Wobjc-autosynthesis-property-ivar-name-match +// CHECK: -Wobjc-bool-constant-conversion +// CHECK: -Wobjc-boxing +// CHECK: -Wobjc-circular-container +// CHECK: -Wobjc-cocoa-api +// CHECK: -Wobjc-designated-initializers +// CHECK: -Wobjc-dictionary-duplicate-keys +// CHECK: -Wobjc-flexible-array +// CHECK: -Wobjc-forward-class-redefinition +// CHECK: -Wobjc-interface-ivars +// CHECK: -Wobjc-literal-compare +// CHECK: -Wobjc-literal-conversion +// CHECK: -Wobjc-macro-redefinition +// CHECK: -Wobjc-messaging-id +// CHECK: -Wobjc-method-access +// CHECK: -Wobjc-missing-property-synthesis +// CHECK: -Wobjc-missing-super-calls +// CHECK: -Wobjc-multiple-method-names +// CHECK: -Wobjc-noncopy-retain-block-property +// CHECK: -Wobjc-nonunified-exceptions +// CHECK: -Wobjc-property-assign-on-object-type +// CHECK: -Wobjc-property-implementation +// CHECK: -Wobjc-property-implicit-mismatch +// CHECK: -Wobjc-property-matches-cocoa-ownership-rule +// CHECK: -Wobjc-property-no-attribute +// CHECK: -Wobjc-property-synthesis +// CHECK: -Wobjc-protocol-method-implementation +// CHECK: -Wobjc-protocol-property-synthesis +// CHECK: -Wobjc-protocol-qualifiers +// CHECK: -Wobjc-readonly-with-setter-property +// CHECK: -Wobjc-redundant-api-use +// CHECK: -Wobjc-redundant-literal-use +// CHECK: -Wobjc-root-class +// CHECK: -Wobjc-signed-char-bool +// CHECK: -Wobjc-signed-char-bool-implicit-float-conversion +// CHECK: -Wobjc-signed-char-bool-implicit-int-conversion +// CHECK: -Wobjc-string-compare +// CHECK: -Wobjc-string-concatenation +// CHECK: -Wobjc-unsafe-perform-selector +// CHECK: -Wodr +// CHECK: -Wold-style-cast +// CHECK: -Wold-style-definition +// CHECK: -Wopencl-unsupported-rgba +// CHECK: -Wopenmp +// CHECK: -Wopenmp-51-extensions +// CHECK: -Wopenmp-clauses +// CHECK: -Wopenmp-loop-form +// CHECK: -Wopenmp-mapping +// CHECK: -Wopenmp-target +// CHECK: -Woption-ignored +// CHECK: -Wordered-compare-function-pointers +// CHECK: -Wout-of-line-declaration +// CHECK: -Wout-of-scope-function +// CHECK: -Wover-aligned +// CHECK: -Woverflow +// CHECK: -Woverlength-strings +// CHECK: -Woverloaded-shift-op-parentheses +// CHECK: -Woverloaded-virtual +// CHECK: -Woverride-init +// CHECK: -Woverride-module +// CHECK: -Woverriding-method-mismatch +// CHECK: -Woverriding-t-option +// CHECK: -Wpacked +// CHECK: -Wpadded +// CHECK: -Wparentheses +// CHECK: -Wparentheses-equality +// CHECK: -Wpartial-availability +// CHECK: -Wpass-failed +// CHECK: -Wpch-date-time +// CHECK: -Wpedantic +// CHECK: -Wpedantic-core-features +// CHECK: -Wpedantic-macros +// CHECK: -Wpessimizing-move +// CHECK: -Wpointer-arith +// CHECK: -Wpointer-bool-conversion +// CHECK: -Wpointer-compare +// CHECK: -Wpointer-integer-compare +// CHECK: -Wpointer-sign +// CHECK: -Wpointer-to-enum-cast +// CHECK: -Wpointer-to-int-cast +// CHECK: -Wpointer-type-mismatch +// CHECK: -Wpoison-system-directories +// CHECK: -Wpotentially-direct-selector +// CHECK: -Wpotentially-evaluated-expression +// CHECK: -Wpragma-clang-attribute +// CHECK: -Wpragma-once-outside-header +// CHECK: -Wpragma-pack +// CHECK: -Wpragma-pack-suspicious-include +// CHECK: -Wpragma-system-header-outside-header +// CHECK: -Wpragmas +// CHECK: -Wpre-c++14-compat +// CHECK: -Wpre-c++14-compat-pedantic +// CHECK: -Wpre-c++17-compat +// CHECK: -Wpre-c++17-compat-pedantic +// CHECK: -Wpre-c++20-compat +// CHECK: -Wpre-c++20-compat-pedantic +// CHECK: -Wpre-c++2b-compat +// CHECK: -Wpre-c++2b-compat-pedantic +// CHECK: -Wpre-c2x-compat +// CHECK: -Wpre-c2x-compat-pedantic +// CHECK: -Wpre-openmp-51-compat +// CHECK: -Wpredefined-identifier-outside-function +// CHECK: -Wprivate-extern +// CHECK: -Wprivate-header +// CHECK: -Wprivate-module +// CHECK: -Wprofile-instr-missing +// CHECK: -Wprofile-instr-out-of-date +// CHECK: -Wprofile-instr-unprofiled +// CHECK: -Wproperty-access-dot-syntax +// CHECK: -Wproperty-attribute-mismatch +// CHECK: -Wprotocol +// CHECK: -Wprotocol-property-synthesis-ambiguity +// CHECK: -Wpsabi +// CHECK: -Wquoted-include-in-framework-header +// CHECK: -Wrange-loop-analysis +// CHECK: -Wrange-loop-bind-reference +// CHECK: -Wrange-loop-construct +// CHECK: -Wreadonly-iboutlet-property +// CHECK: -Wreceiver-expr +// CHECK: -Wreceiver-forward-class +// CHECK: -Wredeclared-class-member +// CHECK: -Wredundant-consteval-if +// CHECK: -Wredundant-decls +// CHECK: -Wredundant-move +// CHECK: -Wredundant-parens +// CHECK: -Wregister +// CHECK: -Wreinterpret-base-class +// CHECK: -Wreorder +// CHECK: -Wreorder-ctor +// CHECK: -Wreorder-init-list +// CHECK: -Wrequires-super-attribute +// CHECK: -Wreserved-id-macro +// CHECK: -Wreserved-identifier +// CHECK: -Wreserved-macro-identifier +// CHECK: -Wreserved-user-defined-literal +// CHECK: -Wrestrict-expansion +// CHECK: -Wretained-language-linkage +// CHECK: -Wreturn-stack-address +// CHECK: -Wreturn-std-move +// CHECK: -Wreturn-type +// CHECK: -Wreturn-type-c-linkage +// CHECK: -Wrewrite-not-bool +// CHECK: -Wrtti +// CHECK: -Wsection +// CHECK: -Wselector +// CHECK: -Wselector-type-mismatch +// CHECK: -Wself-assign +// CHECK: -Wself-assign-field +// CHECK: -Wself-assign-overloaded +// CHECK: -Wself-move +// CHECK: -Wsemicolon-before-method-body +// CHECK: -Wsentinel +// CHECK: -Wsequence-point +// CHECK: -Wserialized-diagnostics +// CHECK: -Wshadow +// CHECK: -Wshadow-all +// CHECK: -Wshadow-field +// CHECK: -Wshadow-field-in-constructor +// CHECK: -Wshadow-field-in-constructor-modified +// CHECK: -Wshadow-ivar +// CHECK: -Wshadow-uncaptured-local +// CHECK: -Wshift-count-negative +// CHECK: -Wshift-count-overflow +// CHECK: -Wshift-negative-value +// CHECK: -Wshift-op-parentheses +// CHECK: -Wshift-overflow +// CHECK: -Wshift-sign-overflow +// CHECK: -Wshorten-64-to-32 +// CHECK: -Wsign-compare +// CHECK: -Wsign-conversion +// CHECK: -Wsign-promo +// CHECK: -Wsigned-enum-bitfield +// CHECK: -Wsigned-unsigned-wchar +// CHECK: -Wsizeof-array-argument +// CHECK: -Wsizeof-array-decay +// CHECK: -Wsizeof-array-div +// CHECK: -Wsizeof-pointer-div +// CHECK: -Wsizeof-pointer-memaccess +// CHECK: -Wslash-u-filename +// CHECK: -Wslh-asm-goto +// CHECK: -Wsometimes-uninitialized +// CHECK: -Wsource-mgr +// CHECK: -Wsource-uses-openmp +// CHECK: -Wspir-compat +// CHECK: -Wspirv-compat +// CHECK: -Wstack-exhausted +// CHECK: -Wstack-protector +// CHECK: -Wstatic-float-init +// CHECK: -Wstatic-in-inline +// CHECK: -Wstatic-inline-explicit-instantiation +// CHECK: -Wstatic-local-in-inline +// CHECK: -Wstatic-self-init +// CHECK: -Wstdlibcxx-not-found +// CHECK: -Wstrict-aliasing +// CHECK: -Wstrict-aliasing=0 +// CHECK: -Wstrict-aliasing=1 +// CHECK: -Wstrict-aliasing=2 +// CHECK: -Wstrict-overflow +// CHECK: -Wstrict-overflow=0 +// CHECK: -Wstrict-overflow=1 +// CHECK: -Wstrict-overflow=2 +// CHECK: -Wstrict-overflow=3 +// CHECK: -Wstrict-overflow=4 +// CHECK: -Wstrict-overflow=5 +// CHECK: -Wstrict-potentially-direct-selector +// CHECK: -Wstrict-prototypes +// CHECK: -Wstrict-selector-match +// CHECK: -Wstring-compare +// CHECK: -Wstring-concatenation +// CHECK: -Wstring-conversion +// CHECK: -Wstring-plus-char +// CHECK: -Wstring-plus-int +// CHECK: -Wstrlcpy-strlcat-size +// CHECK: -Wstrncat-size +// CHECK: -Wsuggest-destructor-override +// CHECK: -Wsuggest-override +// CHECK: -Wsuper-class-method-mismatch +// CHECK: -Wsuspicious-bzero +// CHECK: -Wsuspicious-memaccess +// CHECK: -Wswift-name-attribute +// CHECK: -Wswitch +// CHECK: -Wswitch-bool +// CHECK: -Wswitch-default +// CHECK: -Wswitch-enum +// CHECK: -Wsync-fetch-and-nand-semantics-changed +// CHECK: -Wsynth +// CHECK: -Wtarget-clones-mixed-specifiers +// CHECK: -Wtautological-bitwise-compare +// CHECK: -Wtautological-compare +// CHECK: -Wtautological-constant-compare +// CHECK: -Wtautological-constant-in-range-compare +// CHECK: -Wtautological-constant-out-of-range-compare +// CHECK: -Wtautological-objc-bool-compare +// CHECK: -Wtautological-overlap-compare +// CHECK: -Wtautological-pointer-compare +// CHECK: -Wtautological-type-limit-compare +// CHECK: -Wtautological-undefined-compare +// CHECK: -Wtautological-unsigned-char-zero-compare +// CHECK: -Wtautological-unsigned-enum-zero-compare +// CHECK: -Wtautological-unsigned-zero-compare +// CHECK: -Wtautological-value-range-compare +// CHECK: -Wtcb-enforcement +// CHECK: -Wtentative-definition-incomplete-type +// CHECK: -Wthread-safety +// CHECK: -Wthread-safety-analysis +// CHECK: -Wthread-safety-attributes +// CHECK: -Wthread-safety-beta +// CHECK: -Wthread-safety-negative +// CHECK: -Wthread-safety-precise +// CHECK: -Wthread-safety-reference +// CHECK: -Wthread-safety-verbose +// CHECK: -Wtrigraphs +// CHECK: -Wtype-limits +// CHECK: -Wtype-safety +// CHECK: -Wtypedef-redefinition +// CHECK: -Wtypename-missing +// CHECK: -Wunable-to-open-stats-file +// CHECK: -Wunaligned-access +// CHECK: -Wunaligned-qualifier-implicit-cast +// CHECK: -Wunavailable-declarations +// CHECK: -Wundeclared-selector +// CHECK: -Wundef +// CHECK: -Wundef-prefix +// CHECK: -Wundefined-bool-conversion +// CHECK: -Wundefined-func-template +// CHECK: -Wundefined-inline +// CHECK: -Wundefined-internal +// CHECK: -Wundefined-internal-type +// CHECK: -Wundefined-reinterpret-cast +// CHECK: -Wundefined-var-template +// CHECK: -Wunderaligned-exception-object +// CHECK: -Wunevaluated-expression +// CHECK: -Wunguarded-availability +// CHECK: -Wunguarded-availability-new +// CHECK: -Wunicode +// CHECK: -Wunicode-homoglyph +// CHECK: -Wunicode-whitespace +// CHECK: -Wunicode-zero-width +// CHECK: -Wuninitialized +// CHECK: -Wuninitialized-const-reference +// CHECK: -Wunknown-argument +// CHECK: -Wunknown-assumption +// CHECK: -Wunknown-attributes +// CHECK: -Wunknown-cuda-version +// CHECK: -Wunknown-directives +// CHECK: -Wunknown-escape-sequence +// CHECK: -Wunknown-pragmas +// CHECK: -Wunknown-sanitizers +// CHECK: -Wunknown-warning-option +// CHECK: -Wunnamed-type-template-args +// CHECK: -Wunneeded-internal-declaration +// CHECK: -Wunneeded-member-function +// CHECK: -Wunqualified-std-cast-call +// CHECK: -Wunreachable-code +// CHECK: -Wunreachable-code-aggressive +// CHECK: -Wunreachable-code-break +// CHECK: -Wunreachable-code-fallthrough +// CHECK: -Wunreachable-code-generic-assoc +// CHECK: -Wunreachable-code-loop-increment +// CHECK: -Wunreachable-code-return +// CHECK: -Wunsequenced +// CHECK: -Wunsupported-abi +// CHECK: -Wunsupported-abs +// CHECK: -Wunsupported-availability-guard +// CHECK: -Wunsupported-cb +// CHECK: -Wunsupported-dll-base-class-template +// CHECK: -Wunsupported-floating-point-opt +// CHECK: -Wunsupported-friend +// CHECK: -Wunsupported-gpopt +// CHECK: -Wunsupported-nan +// CHECK: -Wunsupported-target-opt +// CHECK: -Wunsupported-visibility +// CHECK: -Wunusable-partial-specialization +// CHECK: -Wunused +// CHECK: -Wunused-argument +// CHECK: -Wunused-but-set-parameter +// CHECK: -Wunused-but-set-variable +// CHECK: -Wunused-command-line-argument +// CHECK: -Wunused-comparison +// CHECK: -Wunused-const-variable +// CHECK: -Wunused-exception-parameter +// CHECK: -Wunused-function +// CHECK: -Wunused-getter-return-value +// CHECK: -Wunused-label +// CHECK: -Wunused-lambda-capture +// CHECK: -Wunused-local-typedef +// CHECK: -Wunused-local-typedefs +// CHECK: -Wunused-macros +// CHECK: -Wunused-member-function +// CHECK: -Wunused-parameter +// CHECK: -Wunused-private-field +// CHECK: -Wunused-property-ivar +// CHECK: -Wunused-result +// CHECK: -Wunused-template +// CHECK: -Wunused-value +// CHECK: -Wunused-variable +// CHECK: -Wunused-volatile-lvalue +// CHECK: -Wused-but-marked-unused +// CHECK: -Wuser-defined-literals +// CHECK: -Wuser-defined-warnings +// CHECK: -Wvarargs +// CHECK: -Wvariadic-macros +// CHECK: -Wvec-elem-size +// CHECK: -Wvector-conversion +// CHECK: -Wvector-conversions +// CHECK: -Wvexing-parse +// CHECK: -Wvisibility +// CHECK: -Wvla +// CHECK: -Wvla-extension +// CHECK: -Wvoid-pointer-to-enum-cast +// CHECK: -Wvoid-pointer-to-int-cast +// CHECK: -Wvoid-ptr-dereference +// CHECK: -Wvolatile-register-var +// CHECK: -Wwasm-exception-spec +// CHECK: -Wweak-template-vtables +// CHECK: -Wweak-vtables +// CHECK: -Wwritable-strings +// CHECK: -Wwrite-strings +// CHECK: -Wxor-used-as-pow +// CHECK: -Wzero-as-null-pointer-constant +// CHECK: -Wzero-length-array