summaryrefslogtreecommitdiff
path: root/clang-tools-extra/test
diff options
context:
space:
mode:
authorFelix Berger <flx@google.com>2016-11-07 21:45:58 +0000
committerFelix Berger <flx@google.com>2016-11-07 21:45:58 +0000
commit1247d0ed8f8bab52438e459fec4d5ffc7f68ee29 (patch)
tree74691ce1d1cdc9559b40f4194ad30847636273cc /clang-tools-extra/test
parent1c88d0aa70487749c2c906b65b8c1e49eb92f36d (diff)
[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
Diffstat (limited to 'clang-tools-extra/test')
-rw-r--r--clang-tools-extra/test/clang-tidy/performance-unnecessary-value-param-incomplete-type.cpp9
-rw-r--r--clang-tools-extra/test/clang-tidy/performance-unnecessary-value-param.cpp9
2 files changed, 10 insertions, 8 deletions
diff --git a/clang-tools-extra/test/clang-tidy/performance-unnecessary-value-param-incomplete-type.cpp b/clang-tools-extra/test/clang-tidy/performance-unnecessary-value-param-incomplete-type.cpp
new file mode 100644
index 00000000000..cd8c4daccb0
--- /dev/null
+++ b/clang-tools-extra/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]
+}
+
diff --git a/clang-tools-extra/test/clang-tidy/performance-unnecessary-value-param.cpp b/clang-tools-extra/test/clang-tidy/performance-unnecessary-value-param.cpp
index f83e965649a..2006942c181 100644
--- a/clang-tools-extra/test/clang-tidy/performance-unnecessary-value-param.cpp
+++ b/clang-tools-extra/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 @@ void PositiveConstRefNotMoveAssignable(ExpensiveToCopyType A) {
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);