r352119 - [clang-cl] Ignore space-separated /AI arguments

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 24 14:26:51 PST 2019


Author: rnk
Date: Thu Jan 24 14:26:51 2019
New Revision: 352119

URL: http://llvm.org/viewvc/llvm-project?rev=352119&view=rev
Log:
[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

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=352119&r1=352118&r2=352119&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CLCompatOptions.td (original)
+++ cfe/trunk/include/clang/Driver/CLCompatOptions.td Thu Jan 24 14:26:51 2019
@@ -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">;

Modified: cfe/trunk/test/Driver/cl-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=352119&r1=352118&r2=352119&view=diff
==============================================================================
--- cfe/trunk/test/Driver/cl-options.c (original)
+++ cfe/trunk/test/Driver/cl-options.c Thu Jan 24 14:26:51 2019
@@ -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 \




More information about the cfe-commits mailing list