[clang-cl] Ignore space-separated /AI arguments
authorReid Kleckner <rnk@google.com>
Thu, 24 Jan 2019 22:26:51 +0000 (22:26 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 24 Jan 2019 22:26:51 +0000 (22:26 +0000)
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

llvm-svn: 352119

clang/include/clang/Driver/CLCompatOptions.td
clang/test/Driver/cl-options.c

index 4014698..605197e 100644 (file)
@@ -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">;
index f5171d5..4087ef3 100644 (file)
 // (/Zs is for syntax-only)
 // RUN: %clang_cl /Zs \
 // RUN:     /AIfoo \
+// RUN:     /AI foo_does_not_exist \
 // RUN:     /Bt \
 // RUN:     /Bt+ \
 // RUN:     /clr:pure \