summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name-macros.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2019-10-11 12:05:42 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2019-10-11 12:05:42 +0000
commit885c559369fe3d6323898c17787bd0454065fc34 (patch)
treeba43b987e078f4c2a033acc71ad3d7f1ee385a11 /clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name-macros.cpp
parent9f6a873268e1ad9855873d9d8007086c0d01cf4f (diff)
downloadbcm5719-llvm-885c559369fe3d6323898c17787bd0454065fc34.tar.gz
bcm5719-llvm-885c559369fe3d6323898c17787bd0454065fc34.zip
[ClangTidy] Separate tests for infrastructure and checkers
Summary: This change moves tests for checkers and infrastructure into separate directories, making it easier to find infrastructure tests. Tests for checkers are already easy to find because they are named after the checker. Tests for infrastructure were difficult to find because they were outnumbered by tests for checkers. Now they are in a separate directory. Reviewers: jfb, jdoerfert, lebedev.ri Subscribers: srhines, nemanjai, aheejin, kbarton, christof, mgrang, arphaman, jfb, lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68807 llvm-svn: 374540
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name-macros.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name-macros.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name-macros.cpp b/clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name-macros.cpp
deleted file mode 100644
index 4dcf99ec8ef..00000000000
--- a/clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name-macros.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// RUN: %check_clang_tidy %s readability-inconsistent-declaration-parameter-name %t -- \
-// RUN: -config="{CheckOptions: [{key: readability-inconsistent-declaration-parameter-name.IgnoreMacros, value: 0}]}"
-
-#define MACRO() \
- void f(int x)
-
-struct S1 {
- MACRO();
- // CHECK-NOTES: :[[@LINE-1]]:3: warning: function 'S1::f' has a definition with different parameter names
- // CHECK-NOTES: :[[@LINE-5]]:8: note: expanded from macro 'MACRO'
- // CHECK-NOTES: :[[@LINE+4]]:10: note: the definition seen here
- // CHECK-NOTES: :[[@LINE-4]]:3: note: differing parameters are named here: ('x'), in definition: ('y')
- // CHECK-NOTES: :[[@LINE-8]]:8: note: expanded from macro 'MACRO'
-};
-void S1::f(int y) {}
-
-struct S2 {
- int g() const;
- void set_g(int g);
- // CHECK-NOTES: :[[@LINE-1]]:8: warning: function 'S2::set_g' has a definition with different parameter names
- // CHECK-NOTES: :[[@LINE+14]]:1: note: the definition seen here
- // CHECK-NOTES: :[[@LINE+9]]:12: note: expanded from macro 'DEFINITION'
- // This one is unfortunate, but the location this points to is in a scratch
- // space, so it's not helpful to the user.
- // CHECK-NOTES: {{^}}note: expanded from here{{$}}
- // CHECK-NOTES: :[[@LINE-7]]:8: note: differing parameters are named here: ('g'), in definition: ('w')
-};
-
-#define DEFINITION(name, parameter) \
- int S2::name() const { return 0; } \
- void S2::set_##name(int parameter) { \
- (void)parameter; \
- }
-
-DEFINITION(g, w)
-
-//////////////////////////////////////////////////////
-
-#define DECLARE_FUNCTION_WITH_PARAM_NAME(function_name, param_name) \
- void function_name(int param_name)
-
-// CHECK-NOTES: :[[@LINE+1]]:34: warning: function 'macroFunction' has 1 other declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
-DECLARE_FUNCTION_WITH_PARAM_NAME(macroFunction, a);
-// CHECK-NOTES: :[[@LINE+2]]:34: note: the 1st inconsistent declaration seen here
-// CHECK-NOTES: :[[@LINE+1]]:34: note: differing parameters are named here: ('b'), in the other declaration: ('a')
-DECLARE_FUNCTION_WITH_PARAM_NAME(macroFunction, b);
OpenPOWER on IntegriCloud