Skip to content

Commit 67d9276

Browse files
committedMar 24, 2022
[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
1 parent ca46521 commit 67d9276

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed
 

‎clang/include/clang/Driver/Options.td

+1
Original file line numberDiff line numberDiff line change
@@ -6530,6 +6530,7 @@ def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">;
65306530
def _SLASH_utf8 : CLIgnoredFlag<"utf-8">,
65316531
HelpText<"Set source and runtime encoding to UTF-8 (default)">;
65326532
def _SLASH_w : CLIgnoredJoined<"w">;
6533+
def _SLASH_Wv_ : CLIgnoredJoined<"Wv">;
65336534
def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">;
65346535
def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">;
65356536
def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">;

‎clang/test/Driver/cl-options.c

+2
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@
396396
// RUN: /volatile:iso \
397397
// RUN: /w12345 \
398398
// RUN: /wd1234 \
399+
// RUN: /Wv \
400+
// RUN: /Wv:17 \
399401
// RUN: /Zc:__cplusplus \
400402
// RUN: /Zc:auto \
401403
// RUN: /Zc:forScope \

0 commit comments

Comments
 (0)