Author: Tobias Hieta Date: 2022-03-24T09:42:34+01:00 New Revision: 67d9276b16024bae66dfc2fcb739d947637b8c52
URL: https://github.com/llvm/llvm-project/commit/67d9276b16024bae66dfc2fcb739d947637b8c52 DIFF: https://github.com/llvm/llvm-project/commit/67d9276b16024bae66dfc2fcb739d947637b8c52.diff LOG: [clang-cl] Ignore /Wv and /Wv:17 flags MSVC supports passing /Wv and /Wv:17 to ignore warnings added since that version. Clang doesn't have a option like this - but we can ignore this flag instead of error. MSVC documentation: https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level Reviewed By: hans, mstorsjo Differential Revision: https://reviews.llvm.org/D122298 Added: Modified: clang/include/clang/Driver/Options.td clang/test/Driver/cl-options.c Removed: ################################################################################ diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index b5bd2d6c3e1bd..114b230b39e8f 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -6530,6 +6530,7 @@ def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">; def _SLASH_utf8 : CLIgnoredFlag<"utf-8">, HelpText<"Set source and runtime encoding to UTF-8 (default)">; def _SLASH_w : CLIgnoredJoined<"w">; +def _SLASH_Wv_ : CLIgnoredJoined<"Wv">; def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">; def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">; def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">; diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c index f332cd83b26e4..244b4430dd0dc 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c @@ -396,6 +396,8 @@ // RUN: /volatile:iso \ // RUN: /w12345 \ // RUN: /wd1234 \ +// RUN: /Wv \ +// RUN: /Wv:17 \ // RUN: /Zc:__cplusplus \ // RUN: /Zc:auto \ // RUN: /Zc:forScope \ _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits