r300501 - clang-cl: Support the /Zc:twoPhase[-] command-line option (PR32680)
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 17 14:28:36 PDT 2017
Author: hans
Date: Mon Apr 17 16:28:36 2017
New Revision: 300501
URL: http://llvm.org/viewvc/llvm-project?rev=300501&view=rev
Log:
clang-cl: Support the /Zc:twoPhase[-] command-line option (PR32680)
It sounds like MSVC is adding support for two-phase name lookup in a
future version, enabled by this flag (see bug).
Differential Revision: https://reviews.llvm.org/D32138
Modified:
cfe/trunk/include/clang/Driver/CLCompatOptions.td
cfe/trunk/test/Driver/cl-options.c
Modified: cfe/trunk/include/clang/Driver/CLCompatOptions.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CLCompatOptions.td?rev=300501&r1=300500&r2=300501&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CLCompatOptions.td (original)
+++ cfe/trunk/include/clang/Driver/CLCompatOptions.td Mon Apr 17 16:28:36 2017
@@ -172,6 +172,12 @@ def _SLASH_Zc_trigraphs : CLFlag<"Zc:tri
HelpText<"Enable trigraphs">, Alias<ftrigraphs>;
def _SLASH_Zc_trigraphs_off : CLFlag<"Zc:trigraphs-">,
HelpText<"Disable trigraphs (default)">, Alias<fno_trigraphs>;
+def _SLASH_Zc_twoPhase : CLFlag<"Zc:twoPhase">,
+ HelpText<"Enable two-phase name lookup in templates">,
+ Alias<fno_delayed_template_parsing>;
+def _SLASH_Zc_twoPhase_ : CLFlag<"Zc:twoPhase-">,
+ HelpText<"Disable two-phase name lookup in templates">,
+ Alias<fdelayed_template_parsing>;
def _SLASH_Z7 : CLFlag<"Z7">,
HelpText<"Enable CodeView debug information in object files">;
def _SLASH_Zd : CLFlag<"Zd">,
Modified: cfe/trunk/test/Driver/cl-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=300501&r1=300500&r2=300501&view=diff
==============================================================================
--- cfe/trunk/test/Driver/cl-options.c (original)
+++ cfe/trunk/test/Driver/cl-options.c Mon Apr 17 16:28:36 2017
@@ -296,11 +296,14 @@
// NOSTRICT: "-relaxed-aliasing"
// We recognize -f[no-]delayed-template-parsing.
+// /Zc:twoPhase[-] has the opposite meaning.
// 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
+// RUN: %clang_cl -c /Zc:twoPhase- -### -- %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
+// RUN: %clang_cl -c /Zc:twoPhase -### -- %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.
More information about the cfe-commits
mailing list