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 @@ -5767,6 +5767,9 @@ def _SLASH_fp_precise : CLFlag<"fp:precise">, HelpText<"">, Alias; def _SLASH_fp_strict : CLFlag<"fp:strict">, HelpText<"">, Alias; +def _SLASH_fsanitize_EQ_address : CLFlag<"fsanitize=address">, + HelpText<"Enable AddressSanitizer">, + Alias, AliasArgs<["address"]>; def _SLASH_GA : CLFlag<"GA">, Alias, AliasArgs<["local-exec"]>, HelpText<"Assume thread-local variables are defined in the executable">; def _SLASH_GR : CLFlag<"GR">, HelpText<"Emit RTTI data (default)">; @@ -6121,8 +6124,12 @@ def _SLASH_clr : CLJoined<"clr">; def _SLASH_d2 : CLJoined<"d2">; def _SLASH_doc : CLJoined<"doc">; +def _SLASH_experimental : CLJoined<"experimental:">; +def _SLASH_exportHeader : CLFlag<"exportHeader">; def _SLASH_FA_joined : CLJoined<"FA">; def _SLASH_favor : CLJoined<"favor">; +def _SLASH_fsanitize_address_use_after_return : CLJoined<"fsanitize-address-use-after-return">; +def _SLASH_fno_sanitize_address_vcasan_lib : CLJoined<"fno-sanitize-address-vcasan-lib">; def _SLASH_F : CLJoinedOrSeparate<"F">; def _SLASH_Fm : CLJoined<"Fm">; def _SLASH_Fr : CLJoined<"Fr">; @@ -6141,6 +6148,10 @@ def _SLASH_GT : CLFlag<"GT">; def _SLASH_GZ : CLFlag<"GZ">; def _SLASH_H : CLFlag<"H">; +def _SLASH_headername : CLJoined<"headerName:">; +def _SLASH_headerUnit : CLJoinedOrSeparate<"headerUnit">; +def _SLASH_headerUnitAngle : CLJoinedOrSeparate<"headerUnit:angle">; +def _SLASH_headerUnitQuote : CLJoinedOrSeparate<"headerUnit:quote">; def _SLASH_homeparams : CLFlag<"homeparams">; def _SLASH_hotpatch : CLFlag<"hotpatch">; def _SLASH_kernel : CLFlag<"kernel">; @@ -6156,6 +6167,10 @@ def _SLASH_Qspectre_load : CLFlag<"Qspectre-load">; def _SLASH_Qspectre_load_cf : CLFlag<"Qspectre-load-cf">; def _SLASH_Qvec_report : CLJoined<"Qvec-report">; +def _SLASH_reference : CLJoinedOrSeparate<"reference">; +def _SLASH_sourceDependencies : CLJoinedOrSeparate<"sourceDependencies">; +def _SLASH_sourceDependenciesDirectives : CLJoinedOrSeparate<"sourceDependencies:directives">; +def _SLASH_translateInclude : CLFlag<"translateInclude">; def _SLASH_u : CLFlag<"u">; def _SLASH_V : CLFlag<"V">; def _SLASH_WL : CLFlag<"WL">; diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c @@ -56,6 +56,9 @@ // fpstrict-NOT: -menable-unsafe-fp-math // fpstrict-NOT: -ffast-math +// RUN: %clang_cl /fsanitize=address -### -- %s 2>&1 | FileCheck -check-prefix=fsanitize_address %s +// fsanitize_address: -fsanitize=address + // RUN: %clang_cl -### /FA -fprofile-instr-generate -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-INSTR-GENERATE %s // RUN: %clang_cl -### /FA -fprofile-instr-generate=/tmp/somefile.profraw -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-INSTR-GENERATE-FILE %s // CHECK-PROFILE-INSTR-GENERATE: "-fprofile-instrument=clang" "--dependent-lib=clang_rt.profile{{[^"]*}}.lib" @@ -425,6 +428,10 @@ // RUN: /clr:pure \ // RUN: /d2FH4 \ // RUN: /docname \ +// RUN: /experimental:module \ +// RUN: /experimental:preprocessor \ +// RUN: /exportHeader /headerName:foo \ +// RUN: /headerUnit foo.h=foo.ifc /headerUnit:quote foo.h=foo.ifc /headerUnit:angle foo.h=foo.ifc \ // RUN: /EHsc \ // RUN: /F 42 \ // RUN: /FA \ @@ -433,6 +440,8 @@ // RUN: /FAs \ // RUN: /FAu \ // RUN: /favor:blend \ +// RUN: /fsanitize-address-use-after-return \ +// RUN: /fno-sanitize-address-vcasan-lib \ // RUN: /Fifoo \ // RUN: /Fmfoo \ // RUN: /FpDebug\main.pch \ @@ -479,6 +488,10 @@ // RUN: /Qspectre-load \ // RUN: /Qspectre-load-cf \ // RUN: /Qvec-report:2 \ +// RUN: /reference foo=foo.ifc /reference foo.ifc \ +// RUN: /sourceDependencies foo.json \ +// RUN: /sourceDependencies:directives foo.json \ +// RUN: /translateInclude \ // RUN: /u \ // RUN: /V \ // RUN: /volatile:ms \