[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.

  rCTE Clang Tools Extra



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 @@
           ['FileCheck', '-input-file=' + notes_file, input_file_name,
            '-check-prefix=' + check_notes_prefix,
-           '-implicit-check-not={{note|warning|error}}:'],
+           '-implicit-check-not={{note|error}}:'],
     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