[PATCH] D115907: [misexpect] Re-implement MisExpect Diagnostics

Teresa Johnson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 28 09:57:34 PDT 2022


tejohnson added inline comments.


================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1554
+              Twine(*Opts.DiagnosticsMisExpectTolerance), SA);
+
   for (StringRef Sanitizer : serializeSanitizerKinds(Opts.SanitizeRecover))
----------------
paulkirth wrote:
> I really don't understand why this step is necessary, or why in my local builds omitting the call to `GenerateArgs` works at all. I only arrived at this change by noticing other options do the same, and this seemed to fix the issue with tests using the repro instructions from the precommit bots.
> 
> It seems a bit strange that Clang parses the option, stores it to a `CodeGenOption` then puts it back as a string argument to be parsed again later and put into the same data structure. Is this a result of an earlier architecture in Clang? if so, should we reconsider its design?
My understanding is that this is required as part of the cc1 command line parsing. Not sure why it worked in your local builds but not elsewhere. There is some info here: https://clang.llvm.org/docs/InternalsManual.html#adding-new-command-line-option


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115907



More information about the cfe-commits mailing list