[PATCH] D152856: [Driver] Allow warning for unclaimed TargetSpecific options
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 13 14:20:53 PDT 2023
MaskRay created this revision.
MaskRay added reviewers: jansvoboda11, mstorsjo, xen0n, SixWeining.
Herald added a subscriber: hiraditya.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.
For unclaimed target-agnostic options, we can apply clang_ignored_gcc_optimization_f_Group
to accept but warn about them.
% clang -c -fexpensive-optimizations a.c
clang: warning: optimization flag '-fexpensive-optimizations' is not supported [-Wignored-optimization-argument]
For an unclaimed target-specific option, one target may want to accept but warn
about it. Add `llvm::opt::Arg::IgnoredTargetSpecific` to support this warning
need.
Close https://github.com/llvm/llvm-project/issues/63282
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152856
Files:
clang/include/clang/Driver/Options.td
clang/lib/Driver/Driver.cpp
clang/lib/Driver/ToolChains/Arch/LoongArch.cpp
clang/lib/Driver/ToolChains/MinGW.cpp
llvm/include/llvm/Option/Arg.h
llvm/lib/Option/Arg.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152856.531065.patch
Type: text/x-patch
Size: 5873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230613/75abf133/attachment.bin>
More information about the cfe-commits
mailing list