This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] NFC use CHECK-NOTES in tests for performance-move-constructor-init
ClosedPublic

Authored by JonasToth on Sep 29 2018, 7:51 AM.

Event Timeline

JonasToth created this revision.Sep 29 2018, 7:51 AM
alexfh added inline comments.Oct 1 2018, 4:59 AM
test/clang-tidy/performance-move-constructor-init.cpp
115–117

This is an example of not very useful CHECK-NOTES patterns. The corresponding notes are issued in Clang and there's not much value in testing them here. They also duplicate the CHECK-FIXES pattern below. Should the script filter these notes out, maybe?

alexfh requested changes to this revision.Oct 1 2018, 5:00 AM
This revision now requires changes to proceed.Oct 1 2018, 5:00 AM
JonasToth added inline comments.Oct 1 2018, 5:33 AM
test/clang-tidy/performance-move-constructor-init.cpp
115–117

I agree that they dont add any value.
I try to change the filtering regex to give a pass to note: FIX-IT

JonasToth updated this revision to Diff 167917.Oct 2 2018, 3:59 AM
  • adjust regex in check_clang_tidy
JonasToth marked 2 inline comments as done.Oct 2 2018, 4:00 AM

check_clang_tidy now ignores note: FIX-IT, so only diagnostics directly emitted from the check are tested

JonasToth updated this revision to Diff 167918.Oct 2 2018, 4:00 AM
  • fix spurious change
lebedev.ri added inline comments.
test/clang-tidy/check_clang_tidy.py
174

SGTM, if it works.

JonasToth updated this revision to Diff 167932.Oct 2 2018, 6:08 AM
  • filter with builtin python before passing to FileCheck
JonasToth updated this revision to Diff 167933.Oct 2 2018, 6:09 AM
-note remove spurious reordering
test/clang-tidy/check_clang_tidy.py
174

Unfortunatly didnt work with LLVM regex, doing in python now

JonasToth updated this revision to Diff 167934.Oct 2 2018, 6:10 AM
JonasToth marked 2 inline comments as done.
  • finally remove spurious change
Harbormaster completed remote builds in B23359: Diff 167933.
Harbormaster completed remote builds in B23360: Diff 167934.
alexfh accepted this revision.Oct 4 2018, 7:52 AM

LG. Thanks

This revision is now accepted and ready to land.Oct 4 2018, 7:52 AM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.