1// RUN: %check_clang_tidy %s performance-unnecessary-value-param %t -- -fix-errors
2
3// Ensure that incomplete types result in an error from the frontend and not a
4// clang-tidy diagnostic about IncompleteType being expensive to copy.
5struct IncompleteType;
6void NegativeForIncompleteType(IncompleteType I) {
7 // CHECK-MESSAGES: [[@LINE-1]]:47: error: variable has incomplete type 'IncompleteType' [clang-diagnostic-error]
8}
9
10

source code of clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param-incomplete-type.cpp