[PATCH] D127452: [clang-cl][MSVC] Map /external:Wn n=1-4 to -Wsystem-headers
Hans Wennborg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 10 06:03:22 PDT 2022
hans added a comment.
Right, this is not the same, but I suppose it's better than ignoring the flag.
================
Comment at: clang/include/clang/Driver/Options.td:6462
Alias<W_Joined>, AliasArgs<["no-invalid-source-encoding"]>;
+def _SLASH_external_W0 : CLIgnoredFlag<"external:W0">;
+def _SLASH_external_W1 : CLFlag<"external:W1">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>;
----------------
should we map it to -Wno-system-headers?
================
Comment at: clang/test/Driver/cl-zc.cpp:106
// DllExportInlines-NOT: "-fno-dllexport-inlines"
+// RUN: %clang_cl /external:W1 /c -### -- %s 2>&1 | FileCheck -check-prefix=EXTERNAL_Wn %s
----------------
This is not the right test file, cl-zc.cpp is for testing /Zc flags.
I don't think we have a special file for clang-cl warning flags, so clang/test/Driver/cl-options.c would be the file to use.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127452/new/
https://reviews.llvm.org/D127452
More information about the cfe-commits
mailing list