This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] refactor the use of the SMDiagnostics in replacement warnings
ClosedPublic

Authored by MyDeveloperDay on Nov 6 2019, 1:33 PM.

Details

Summary

Review comments in D69854: [clang-format] [RELAND] Remove the dependency on frontend recommended a simpler approach of creating the SMDiagnostics to remove much of the complexity. (thanks @thakis)

@vlad.tsyrklevich I've rebuilt on both Windows and Linux (running Linux with Address and Undefined sanitizers) over the clang code base

Diff Detail

Event Timeline

MyDeveloperDay created this revision.Nov 6 2019, 1:33 PM

Remove unused Ranges

MyDeveloperDay marked an inline comment as done.Nov 11 2019, 5:37 AM
MyDeveloperDay added inline comments.
clang/tools/clang-format/ClangFormat.cpp
304

Note to self: this can probably go outside the loop.

Move adding the source file to the source mgr outside the replacements loop

thakis accepted this revision.Nov 13 2019, 12:45 AM

Looks great, thanks!

Do you remember where you got the original code from? Would this work there too? Or does that not use the llvm diag classes?

This revision is now accepted and ready to land.Nov 13 2019, 12:45 AM
This revision was automatically updated to reflect the committed changes.