thakis created this revision. thakis added a reviewer: hans. thakis edited the summary of this revision. hans accepted this revision. hans added a comment. This revision is now accepted and ready to land.
lgtm, thanks! See https://blogs.msdn.microsoft.com/vcblog/2018/04/09/msvc-now-correctly-reports-__cplusplus/ clang-cl already sets __cplusplus to the correct value, so we can just ignore this flag. Also add test coverage for a few more accepted-but-ignored flags. https://reviews.llvm.org/D45877 Files: include/clang/Driver/CLCompatOptions.td test/Driver/cl-options.c Index: test/Driver/cl-options.c =================================================================== --- test/Driver/cl-options.c +++ test/Driver/cl-options.c @@ -346,6 +346,7 @@ // RUN: /GS- \ // RUN: /kernel- \ // RUN: /nologo \ +// RUN: /Og \ // RUN: /openmp- \ // RUN: /permissive- \ // RUN: /RTC1 \ @@ -357,6 +358,14 @@ // RUN: /volatile:iso \ // RUN: /w12345 \ // RUN: /wd1234 \ +// RUN: /Zc:__cplusplus \ +// RUN: /Zc:auto \ +// RUN: /Zc:forScope \ +// RUN: /Zc:inline \ +// RUN: /Zc:rvalueCast \ +// RUN: /Zc:ternary \ +// RUN: /Zc:wchar_t \ +// RUN: /Zm \ // RUN: /Zo \ // RUN: /Zo- \ // RUN: -### -- %s 2>&1 | FileCheck -check-prefix=IGNORED %s Index: include/clang/Driver/CLCompatOptions.td =================================================================== --- include/clang/Driver/CLCompatOptions.td +++ include/clang/Driver/CLCompatOptions.td @@ -338,12 +338,13 @@ def _SLASH_utf8 : CLIgnoredFlag<"utf-8">, HelpText<"Set source and runtime encoding to UTF-8 (default)">; def _SLASH_w : CLIgnoredJoined<"w">; +def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">; def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">; 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_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">; def _SLASH_Zm : CLIgnoredJoined<"Zm">; def _SLASH_Zo : CLIgnoredFlag<"Zo">; def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">;
Index: test/Driver/cl-options.c =================================================================== --- test/Driver/cl-options.c +++ test/Driver/cl-options.c @@ -346,6 +346,7 @@ // RUN: /GS- \ // RUN: /kernel- \ // RUN: /nologo \ +// RUN: /Og \ // RUN: /openmp- \ // RUN: /permissive- \ // RUN: /RTC1 \ @@ -357,6 +358,14 @@ // RUN: /volatile:iso \ // RUN: /w12345 \ // RUN: /wd1234 \ +// RUN: /Zc:__cplusplus \ +// RUN: /Zc:auto \ +// RUN: /Zc:forScope \ +// RUN: /Zc:inline \ +// RUN: /Zc:rvalueCast \ +// RUN: /Zc:ternary \ +// RUN: /Zc:wchar_t \ +// RUN: /Zm \ // RUN: /Zo \ // RUN: /Zo- \ // RUN: -### -- %s 2>&1 | FileCheck -check-prefix=IGNORED %s Index: include/clang/Driver/CLCompatOptions.td =================================================================== --- include/clang/Driver/CLCompatOptions.td +++ include/clang/Driver/CLCompatOptions.td @@ -338,12 +338,13 @@ def _SLASH_utf8 : CLIgnoredFlag<"utf-8">, HelpText<"Set source and runtime encoding to UTF-8 (default)">; def _SLASH_w : CLIgnoredJoined<"w">; +def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">; def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">; 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_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">; def _SLASH_Zm : CLIgnoredJoined<"Zm">; def _SLASH_Zo : CLIgnoredFlag<"Zo">; def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits