[PATCH] D52690: [clang-tidy] NFC use CHECK-NOTES in tests for misc-misplaced-const

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 1 05:37:40 PDT 2018


JonasToth added inline comments.


================
Comment at: test/clang-tidy/misc-misplaced-const.c:18
+  // CHECK-NOTES: :[[@LINE-1]]:12: warning: 'i3' declared with a const-qualified typedef type; results in the type being 'int *const' instead of 'const int *'
+  // CHECK-NOTES: :[[@LINE-14]]:14: note: typedef declared here
 
----------------
alexfh wrote:
> These notes are also just marginally useful and make it harder to change the test. I wonder whether an absolute line number would make more sense here. Or maybe just add a test for one of the notes and leave out the rest (and keep CHECK-MESSAGES)?
Absolute line number makes sense. IMHO the tests should cover all generated diagnostics including the notes. Would you accept sticking with `CHECK-NOTES` but with absolute line numbers?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D52690





More information about the cfe-commits mailing list