From 64852e901a54822c837e5279f4f5af74b98dcedf Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Fri, 8 Mar 2019 10:00:42 +0000 Subject: [PATCH] clang-cl : Parse all /d2 options We will now warn about such options being unused, which is better than the current "no such file or directory: '/d2foo'" errors. Note that we can still handle specific flags separately, e.g. we were already ignoring /d2FastFail and /d2Zi+ llvm-svn: 355682 --- clang/include/clang/Driver/CLCompatOptions.td | 1 + clang/test/Driver/cl-options.c | 1 + 2 files changed, 2 insertions(+) diff --git a/clang/include/clang/Driver/CLCompatOptions.td b/clang/include/clang/Driver/CLCompatOptions.td index 2ac03b3..d678464 100644 --- a/clang/include/clang/Driver/CLCompatOptions.td +++ b/clang/include/clang/Driver/CLCompatOptions.td @@ -400,6 +400,7 @@ def _SLASH_AI : CLJoinedOrSeparate<"AI">; def _SLASH_Bt : CLFlag<"Bt">; def _SLASH_Bt_plus : CLFlag<"Bt+">; def _SLASH_clr : CLJoined<"clr">; +def _SLASH_d2 : CLJoined<"d2">; def _SLASH_doc : CLJoined<"doc">; def _SLASH_FA_joined : CLJoined<"FA">; def _SLASH_favor : CLJoined<"favor">; diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c index 33b1575..756cce1 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c @@ -397,6 +397,7 @@ // RUN: /Bt \ // RUN: /Bt+ \ // RUN: /clr:pure \ +// RUN: /d2FH4 \ // RUN: /docname \ // RUN: /EHsc \ // RUN: /F \ -- 2.7.4