From 4828e1069337a167df24e0ca2c30c9492ccf222a Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 24 Jan 2019 22:26:51 +0000 Subject: [PATCH] [clang-cl] Ignore space-separated /AI arguments The /AI flag is for #using directives, which I don't think we support. This is consistent with how the /I flag is handled by MSVC. Add a test for it. Differential Revision: https://reviews.llvm.org/D57189 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352119 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/CLCompatOptions.td | 2 +- test/Driver/cl-options.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/clang/Driver/CLCompatOptions.td b/include/clang/Driver/CLCompatOptions.td index 4014698895..605197efc1 100644 --- a/include/clang/Driver/CLCompatOptions.td +++ b/include/clang/Driver/CLCompatOptions.td @@ -394,7 +394,7 @@ def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">; // Unsupported: -def _SLASH_AI : CLJoined<"AI">; +def _SLASH_AI : CLJoinedOrSeparate<"AI">; def _SLASH_Bt : CLFlag<"Bt">; def _SLASH_Bt_plus : CLFlag<"Bt+">; def _SLASH_clr : CLJoined<"clr">; diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index f5171d5c04..4087ef3b8c 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -387,6 +387,7 @@ // (/Zs is for syntax-only) // RUN: %clang_cl /Zs \ // RUN: /AIfoo \ +// RUN: /AI foo_does_not_exist \ // RUN: /Bt \ // RUN: /Bt+ \ // RUN: /clr:pure \ -- 2.40.0