[PATCH] D17482: [clang-tidy] Allow tests to verify changes made to header files
Richard via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 18 22:07:56 PDT 2016
LegalizeAdulthood added a comment.
test/clang-tidy/misc-unused-parameters.cpp currently does a hack to verify headers by committing the manually fixed header and diffing it:
// RUN: echo "static void staticFunctionHeader(int i) {}" > %T/header.h
// RUN: echo "static void staticFunctionHeader(int /*i*/) {}" > %T/header-fixed.h
// RUN: %check_clang_tidy %s misc-unused-parameters %t -- -header-filter='.*' -- -std=c++11 -fno-delayed-template-parsing
// RUN: diff %T/header.h %T/header-fixed.h
#include "header.h"
// CHECK-MESSAGES: header.h:1:38: warning
I think this would be much cleaner with `header.h` as a regularly comitted file with `CHECK-MESSAGES` and `CHECK-FIXES` lines in that file.
http://reviews.llvm.org/D17482
More information about the cfe-commits
mailing list