summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-05-31 14:50:28 +0000
committerReid Kleckner <rnk@google.com>2017-05-31 14:50:28 +0000
commit36438ba651b2596b33d0d92315a359f3c96e31b2 (patch)
treeb5e44b29a352a060f5ffad14ae2b27c4919349e2
parent50e3e123e81df9f5c4c081cb731110ed5c962215 (diff)
downloadbcm5719-llvm-36438ba651b2596b33d0d92315a359f3c96e31b2.tar.gz
bcm5719-llvm-36438ba651b2596b33d0d92315a359f3c96e31b2.zip
[clang-cl] Ignore /Zc:ternary, clang behaves this way already
Addresses part of PR33237 llvm-svn: 304303
-rw-r--r--clang/include/clang/Driver/CLCompatOptions.td1
-rw-r--r--clang/test/Driver/cl-zc.cpp5
2 files changed, 6 insertions, 0 deletions
diff --git a/clang/include/clang/Driver/CLCompatOptions.td b/clang/include/clang/Driver/CLCompatOptions.td
index d0d9c679de7..bb039c178ea 100644
--- a/clang/include/clang/Driver/CLCompatOptions.td
+++ b/clang/include/clang/Driver/CLCompatOptions.td
@@ -324,6 +324,7 @@ def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">;
def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">;
def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">;
def _SLASH_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">;
+def _SLASH_Zc_ternary : CLIgnoredFlag<"Zc:ternary">;
def _SLASH_Zm : CLIgnoredJoined<"Zm">;
def _SLASH_Zo : CLIgnoredFlag<"Zo">;
def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">;
diff --git a/clang/test/Driver/cl-zc.cpp b/clang/test/Driver/cl-zc.cpp
index 26496293201..4414eb6ebba 100644
--- a/clang/test/Driver/cl-zc.cpp
+++ b/clang/test/Driver/cl-zc.cpp
@@ -53,6 +53,11 @@
// RUN: %clang_cl /c -### /Zc:inline- -- %s 2>&1 | FileCheck -check-prefix=INLINE-OFF %s
// INLINE-OFF: argument unused during compilation
+// RUN: %clang_cl /c -### /Zc:ternary -- %s 2>&1 | FileCheck -check-prefix=TERNARY-ON %s
+// TERNARY-ON-NOT: argument unused during compilation
+// RUN: %clang_cl /c -### /Zc:ternary- -- %s 2>&1 | FileCheck -check-prefix=TERNARY-OFF %s
+// TERNARY-OFF: argument unused during compilation
+
// These never warn, but don't have an effect yet.
OpenPOWER on IntegriCloud