From 280985ba383b56e3d64fa64f20cd4cc584fb8622 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sat, 7 Oct 2023 16:41:50 +0300 Subject: Add some entries into cpp.hint Improves VS integration: allows to find DECL_LINK implementations, as well as CPP unit tests defined using CPPUNIT_TEST_FIXTURE. The macros are stripped down to the minimum to allow IntelliSence do its job efficiently. Change-Id: I2de02196d44d72f79d8cd9e06e8093a7620bd9e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157677 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- cpp.hint | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) (limited to 'cpp.hint') diff --git a/cpp.hint b/cpp.hint index fcc7da600731..63269345ce7c 100644 --- a/cpp.hint +++ b/cpp.hint @@ -1,4 +1,46 @@ -// Hint files help the Visual Studio IDE interpret Visual C++ identifiers -// such as names of functions and macros. -// For more information see https://go.microsoft.com/fwlink/?linkid=865984 -#define SAL_THROW_EXTERN_C() +// Hint files help the Visual Studio IDE interpret Visual C++ identifiers +// such as names of functions and macros. +// For more information see https://go.microsoft.com/fwlink/?linkid=865984 + +#define SAL_THROW_EXTERN_C() + +#define SAL_UNUSED_PARAMETER + +#define DECL_LINK(Member, ArgType, RetType) \ + RetType Member(ArgType) + +#define DECL_STATIC_LINK(Class, Member, ArgType, RetType) \ + static RetType Member(Class *, ArgType) + +#define DECL_DLLPRIVATE_LINK(Member, ArgType, RetType) \ + SAL_DLLPRIVATE RetType Member(ArgType) + +#define DECL_DLLPRIVATE_STATIC_LINK(Class, Member, ArgType, RetType) \ + SAL_DLLPRIVATE static RetType Member(Class *, ArgType) + +#define IMPL_LINK(Class, Member, ArgType, ArgName, RetType) \ + RetType Class::Member(ArgType ArgName) + +#define IMPL_LINK_NOARG(Class, Member, ArgType, RetType) \ + RetType Class::Member(ArgType) + +#define IMPL_STATIC_LINK(Class, Member, ArgType, ArgName, RetType) \ + RetType Class::Member(Class *, ArgType ArgName) + +#define IMPL_STATIC_LINK_NOARG(Class, Member, ArgType, RetType) \ + RetType Class::Member(Class *, ArgType) + +// From workdir/UnpackedTarball/cppunit/include/cppunit/plugin/TestPlugIn.h + +#define CPPUNIT_PLUGIN_IMPLEMENT() + +// From workdir/UnpackedTarball/cppunit/include/cppunit/extensions/HelperMacros.h +// To allow searching for the test names, where they are defined using the macros + +#define CPPUNIT_TEST_FIXTURE(TestClass, TestName) \ + class TestName : public TestClass \ + { \ + public: \ + void TestBody(); \ + }; \ + void TestName::TestBody() -- cgit