diff options
Diffstat (limited to 'clang-tools-extra/unittests/clang-tidy')
-rw-r--r-- | clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp b/clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp index d986d3bcb04..89e47407c98 100644 --- a/clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp +++ b/clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp @@ -47,6 +47,15 @@ TEST(ExplicitConstructorCheckTest, RemoveExplicit) { "class C { explicit/*asdf*/ C(const C&, int i = 0); };")); } +TEST(ExplicitConstructorCheckTest, RemoveExplicitWithMacros) { + EXPECT_EQ( + "#define A(T) class T##Bar { explicit T##Bar(const T##Bar &b) {} };\n" + "A(Foo);", + runCheckOnCode<ExplicitConstructorCheck>( + "#define A(T) class T##Bar { explicit T##Bar(const T##Bar &b) {} };\n" + "A(Foo);")); +} + } // namespace test } // namespace tidy } // namespace clang |