[PATCH] D107402: Correct a lot of diagnostic wordings for the driver

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 4 09:13:29 PDT 2021


erichkeane added inline comments.


================
Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:88
+def err_drv_bad_target_id : Error<
+  "invalid target ID: %0 (a target ID is a processor name followed by an "
+  "optional list of predefined features post-fixed by a plus or minus sign "
----------------
Quuxplusone wrote:
> aaron.ballman wrote:
> > erichkeane wrote:
> > >   invalid target ID %0; format is processor name followed by an optional colon delimited list of features followed by enable/disable sign, .e.g. 'gfx908:sramecc+;xnack-'
> > > 
> > > ??  I think we should be leaning on the example more to explain the format.
> > I think that's an improvement; the current wording is... hard to interpret. I tweaked it slightly, WDYT?
> Erich's suggested wording lacks the colon: `invalid target ID %0`, not `invalid target ID: %0`. I agree with Erich's suggestion.
> And shouldn't it be `'%0'`, not `%0`, because it's quoting user input? Compare lines 96, 98, 206, etc.
Ah, right!  I missed that in review.  Yes, I think the colon doesn't add anything/should be removed.  I also agree about quoting it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107402/new/

https://reviews.llvm.org/D107402



More information about the cfe-commits mailing list