[PATCH] D101387: [Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion
Dávid Bolvanský via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 3 11:16:33 PDT 2021
xbolva00 added inline comments.
================
Comment at: clang/test/Driver/stack-protector-guard.c:38
// CHECK-GS: "-cc1" {{.*}}"-mstack-protector-guard-reg=gs"
-// INVALID-REG: error: invalid value {{.*}} in 'mstack-protector-guard-reg=','for X86, valid arguments to '-mstack-protector-guard-reg=' are:fs gs'
+// INVALID-REG: error: invalid value {{.*}} in 'mstack-protector-guard-reg=', expected: fs gs
----------------
xbolva00 wrote:
> nickdesaulniers wrote:
> > nickdesaulniers wrote:
> > > xbolva00 wrote:
> > > > Not very happy with suggestion, maybe worse than before. It sounds to me that now this suggests
> > > >
> > > > "-mstack-protector-guard-reg=fs gs" which is a bad suggestion...
> > > >
> > > > Better (?):
> > > > error: invalid value {{.*}} in 'mstack-protector-guard-reg=', expected 'XX or 'YY'
> > > >
> > > > as both use sites suggest two values, this wording could be good enough.
> > > In the follow up commit, D100919, this flag will have 3 values.
> > Perhaps:
> >
> > error: invalid value {{.*}} in 'mstack-protector-guard-reg=', expected one of: fs gs
> or use select,
> "expected %select('XX'| 'XX or 'YY')" for generalization
Yeah, good idea.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101387/new/
https://reviews.llvm.org/D101387
More information about the cfe-commits
mailing list