[PATCH] D137659: [Driver] Refactor err_drv_unsupported_option_argument call sites to use llvm::opt::Arg::getSpelling
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 8 11:24:07 PST 2022
MaskRay created this revision.
MaskRay added a reviewer: lenary.
Herald added subscribers: StephenFan, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, atanasyan, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, sdardis.
Herald added projects: Flang, All.
MaskRay requested review of this revision.
Herald added subscribers: cfe-commits, pcwang-thead, jdoerfert.
Herald added a project: clang.
For `-foo=bar`, getSpelling return `-foo=` which is exactly what we need from
the diagnostic. Drop `-` from the err_drv_unsupported_option_argument template.
This change makes `--` long option diagnostics more convenient.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137659
Files:
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/lib/Driver/Driver.cpp
clang/lib/Driver/SanitizerArgs.cpp
clang/lib/Driver/ToolChains/Arch/AArch64.cpp
clang/lib/Driver/ToolChains/Arch/ARM.cpp
clang/lib/Driver/ToolChains/Arch/Mips.cpp
clang/lib/Driver/ToolChains/Arch/RISCV.cpp
clang/lib/Driver/ToolChains/Arch/X86.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/lib/Driver/ToolChains/Flang.cpp
clang/lib/Driver/ToolChains/Gnu.cpp
clang/lib/Driver/ToolChains/Hexagon.cpp
clang/lib/Driver/ToolChains/MSP430.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/Driver/mingw-cfguard.c
flang/lib/Frontend/CompilerInvocation.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137659.474056.patch
Type: text/x-patch
Size: 17462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221108/5c4c5111/attachment-0001.bin>
More information about the cfe-commits
mailing list