[PATCH] D51381: [clang-tidy] fix check_clang_tidy to properly mix CHECK-NOTES and CHECK-MESSAGES

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 28 14:00:34 PDT 2018


JonasToth created this revision.
JonasToth added reviewers: alexfh, aaron.ballman, lebedev.ri, hokein.
Herald added subscribers: cfe-commits, xazax.hun.

This patch adjusts the check_clang_tidy.py script to tolerate warnings in the
codepath that checks for notes.
Checking for warnings itself should be done with 'CHECK-MESSAGES'. This patch
ensures that mixing 'CHECK-MESSAGES' and 'CHECK-NOTES' work within the same
clang-tidy test file and can be mixed.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51381

Files:
  test/clang-tidy/check_clang_tidy.py


Index: test/clang-tidy/check_clang_tidy.py
===================================================================
--- test/clang-tidy/check_clang_tidy.py
+++ test/clang-tidy/check_clang_tidy.py
@@ -166,7 +166,7 @@
       subprocess.check_output(
           ['FileCheck', '-input-file=' + notes_file, input_file_name,
            '-check-prefix=' + check_notes_prefix,
-           '-implicit-check-not={{note|warning|error}}:'],
+           '-implicit-check-not={{note|error}}:'],
           stderr=subprocess.STDOUT)
     except subprocess.CalledProcessError as e:
       print('FileCheck failed:\n' + e.output.decode())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51381.162952.patch
Type: text/x-patch
Size: 618 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180828/63b1b44e/attachment-0001.bin>


More information about the cfe-commits mailing list