Index: cfe/trunk/include/clang/Driver/Options.td =================================================================== --- cfe/trunk/include/clang/Driver/Options.td +++ cfe/trunk/include/clang/Driver/Options.td @@ -882,7 +882,7 @@ "(default))">; def fdelayed_template_parsing : Flag<["-"], "fdelayed-template-parsing">, Group, HelpText<"Parse templated function definitions at the end of the " - "translation unit">, Flags<[CC1Option]>; + "translation unit">, Flags<[CC1Option, CoreOption]>; def fms_memptr_rep_EQ : Joined<["-"], "fms-memptr-rep=">, Group, Flags<[CC1Option]>; def fmodules_cache_path : Joined<["-"], "fmodules-cache-path=">, Group, Flags<[DriverOption, CC1Option]>, MetaVarName<"">, @@ -1031,7 +1031,8 @@ Flags<[CoreOption]>; def fno_ms_compatibility : Flag<["-"], "fno-ms-compatibility">, Group, Flags<[CoreOption]>; -def fno_delayed_template_parsing : Flag<["-"], "fno-delayed-template-parsing">, Group; +def fno_delayed_template_parsing : Flag<["-"], "fno-delayed-template-parsing">, Group, + Flags<[DriverOption, CoreOption]>; def fno_objc_exceptions: Flag<["-"], "fno-objc-exceptions">, Group; def fno_objc_legacy_dispatch : Flag<["-"], "fno-objc-legacy-dispatch">, Group; def fno_objc_weak : Flag<["-"], "fno-objc-weak">, Group, Flags<[CC1Option]>; Index: cfe/trunk/test/Driver/cl-options.c =================================================================== --- cfe/trunk/test/Driver/cl-options.c +++ cfe/trunk/test/Driver/cl-options.c @@ -295,6 +295,14 @@ // RUN: %clang_cl -c -fno-strict-aliasing -### -- %s 2>&1 | FileCheck -check-prefix=NOSTRICT %s // NOSTRICT: "-relaxed-aliasing" +// We recognize -f[no-]delayed-template-parsing. +// RUN: %clang_cl -c -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDDEFAULT %s +// DELAYEDDEFAULT: "-fdelayed-template-parsing" +// RUN: %clang_cl -c -fdelayed-template-parsing -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDON %s +// DELAYEDON: "-fdelayed-template-parsing" +// RUN: %clang_cl -c -fno-delayed-template-parsing -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDOFF %s +// DELAYEDOFF-NOT: "-fdelayed-template-parsing" + // For some warning ids, we can map from MSVC warning to Clang warning. // RUN: %clang_cl -wd4005 -wd4100 -wd4910 -wd4996 -### -- %s 2>&1 | FileCheck -check-prefix=Wno %s // Wno: "-cc1"