This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Escape diagnostic messages before passing to `diag` in Transformer.
ClosedPublic

Authored by ymandel on May 4 2022, 11:49 AM.

Details

Summary

Messages generated by Transformer rules may have % in them, which
needs to be escaped before being passed to diag, which interprets them
specially (and crashes if they are misused).

Diff Detail

Event Timeline

ymandel created this revision.May 4 2022, 11:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2022, 11:49 AM
ymandel requested review of this revision.May 4 2022, 11:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2022, 11:49 AM
gribozavr2 accepted this revision.May 4 2022, 1:35 PM
gribozavr2 added inline comments.
clang-tools-extra/unittests/clang-tidy/TransformerClangTidyCheckTest.cpp
107
This revision is now accepted and ready to land.May 4 2022, 1:35 PM
ymandel updated this revision to Diff 427126.May 4 2022, 1:50 PM

address reviewer comments.

ymandel marked an inline comment as done.May 4 2022, 1:51 PM

Thanks!

This revision was landed with ongoing or failed builds.May 4 2022, 1:57 PM
This revision was automatically updated to reflect the committed changes.