This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Add support for NOLINTNEXTLINE.
ClosedPublic

Authored by bkramer on Feb 13 2017, 10:17 AM.

Event Timeline

bkramer created this revision.Feb 13 2017, 10:17 AM
alexfh accepted this revision.Feb 14 2017, 4:18 AM

Awesome! LG with one nit.

clang-tidy/ClangTidyDiagnosticConsumer.cpp
300

Is it difficult to address right away?

I also suppose (https://en.wikipedia.org/wiki/Newline#Representations) that we only care about CR+LF or LF line endings, so just looking at LFs seems more than enough (and will make code slightly simpler). This is the approach we took in many places in clang-format.

This revision is now accepted and ready to land.Feb 14 2017, 4:18 AM
bkramer updated this revision to Diff 88352.Feb 14 2017, 4:58 AM
  • Simplify code by not worrying about \r
  • Don't allow blank lines between NOLINTNEXTLINE and the warning
This revision was automatically updated to reflect the committed changes.