Author: flx Date: Mon Nov 7 15:45:58 2016 New Revision: 286155 URL: http://llvm.org/viewvc/llvm-project?rev=286155&view=rev Log: [clang-tidy] Move incomplete type test into separate test file
Summary: Move in complete type test which does not compile into its own test file. Reviewers: alexfh, sbenza, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26369 Added: clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param-incomplete-type.cpp Modified: clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param.cpp Added: clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param-incomplete-type.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param-incomplete-type.cpp?rev=286155&view=auto ============================================================================== --- clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param-incomplete-type.cpp (added) +++ clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param-incomplete-type.cpp Mon Nov 7 15:45:58 2016 @@ -0,0 +1,9 @@ +// RUN: %check_clang_tidy %s performance-unnecessary-value-param %t -- -fix-errors -- --std=c++11 + +// Ensure that incomplete types result in an error from the frontend and not a +// clang-tidy diagnostic about IncompleteType being expensive to copy. +struct IncompleteType; +void NegativeForIncompleteType(IncompleteType I) { + // CHECK-MESSAGES: [[@LINE-1]]:47: error: variable has incomplete type 'IncompleteType' [clang-diagnostic-error] +} + Modified: clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param.cpp?rev=286155&r1=286154&r2=286155&view=diff ============================================================================== --- clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param.cpp (original) +++ clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param.cpp Mon Nov 7 15:45:58 2016 @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy %s performance-unnecessary-value-param %t -- -fix-errors -- --std=c++11 +// RUN: %check_clang_tidy %s performance-unnecessary-value-param %t // CHECK-FIXES: #include <utility> @@ -238,13 +238,6 @@ void PositiveConstRefNotMoveAssignable(E B = A; } -// Ensure that incomplete types result in an error from the frontend and not a -// clang-tidy diagnostic about IncompleteType being expensive to copy. -struct IncompleteType; -void NegativeForIncompleteType(IncompleteType I) { - // CHECK-MESSAGES: [[@LINE-1]]:47: error: variable has incomplete type 'IncompleteType' [clang-diagnostic-error] -} - // Case where parameter in declaration is already const-qualified but not in // implementation. Make sure a second 'const' is not added to the declaration. void PositiveConstDeclaration(const ExpensiveToCopyType A); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits