Skip to content

Commit 70c7146

Browse files
committed
Silenced clang warning about c-linkage in Unittestpp
1 parent 2aff296 commit 70c7146

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Release/tests/common/UnitTestpp/src/TestList.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,15 @@ ListAdder::ListAdder(TestList& list, Test* test, ...)
100100
list.Add(test);
101101
}
102102

103+
#if defined(__clang__)
104+
#pragma clang diagnostic push
105+
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
106+
#endif
103107
extern "C"
104108
UNITTEST_LINKAGE TestList& GetTestList()
109+
#if defined(__clang__)
110+
#pragma clang diagnostic pop
111+
#endif
105112
{
106113
static TestList GLOBAL_TESTLIST;
107114
return GLOBAL_TESTLIST;

0 commit comments

Comments
 (0)