[PATCH] D26369: [ClangTidy] Move incomplete type test into separate test file
Felix Berger via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 7 13:46:52 PST 2016
flx removed rL LLVM as the repository for this revision.
flx updated this revision to Diff 77094.
https://reviews.llvm.org/D26369
Files:
test/clang-tidy/performance-unnecessary-value-param-incomplete-type.cpp
test/clang-tidy/performance-unnecessary-value-param.cpp
Index: test/clang-tidy/performance-unnecessary-value-param.cpp
===================================================================
--- test/clang-tidy/performance-unnecessary-value-param.cpp
+++ test/clang-tidy/performance-unnecessary-value-param.cpp
@@ -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 @@
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);
Index: test/clang-tidy/performance-unnecessary-value-param-incomplete-type.cpp
===================================================================
--- /dev/null
+++ test/clang-tidy/performance-unnecessary-value-param-incomplete-type.cpp
@@ -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]
+}
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26369.77094.patch
Type: text/x-patch
Size: 1782 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161107/3451b343/attachment.bin>
More information about the cfe-commits
mailing list