rsmith accepted this revision.
rsmith added a comment.

LGTM with one change.



================
Comment at: include/clang/Basic/DiagnosticDriverKinds.td:95
 def err_drv_force_crash : Error<
-  "failing because environment variable '%0' is set">;
+  "failing because %select{environment variable|option}0 '%1' is set">;
 def err_drv_invalid_mfloat_abi : Error<
----------------
mehdi_amini wrote:
> Is it worth it? What about `"failing because %1 is set">;`
> 
> And then later:
> 
> ```
> Diags.Report(diag::err_drv_force_crash) << "option '-gen-reproducer'";
> ```
Even though we don't have translations for our diagnostics, it's intended that 
they be translatable, so you should not hardcode strings like "option " and 
"environment variable " in the code. Use a %select here instead, maybe? (See 
http://clang.llvm.org/docs/InternalsManual.html#the-format-string)


https://reviews.llvm.org/D27604



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D27604: [Drive... Richard Smith via Phabricator via cfe-commits

Reply via email to