From: Eric Ludlam Date: Mon, 28 Oct 2019 00:36:17 +0000 (-0400) Subject: * test/manual/cedet/tests/testdoublens.cpp: Update from upstream X-Git-Tag: emacs-27.0.90~795 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=31ed03020c458daabdd8feac741e276a1b7f723b;p=emacs.git * test/manual/cedet/tests/testdoublens.cpp: Update from upstream * test/manual/cedet/tests/testdoublens.hpp: Merge content from CEDET on SF with extended test points for use with test/lisp/cedet/semantic-utest-ia.el Author: Eric Ludlam --- diff --git a/test/manual/cedet/tests/testdoublens.cpp b/test/manual/cedet/tests/testdoublens.cpp index 4d10644e447..9449f971104 100644 --- a/test/manual/cedet/tests/testdoublens.cpp +++ b/test/manual/cedet/tests/testdoublens.cpp @@ -39,12 +39,27 @@ namespace Name1 { return 0; } - void Foo::publishStuff(int /* a */, int /* b */) // ^2^ + void Foo::publishStuff(int a, int b) // ^2^ { + int foo = a; + int bar = b; } - void Foo::sendStuff(int /* a */, int /* b */) // ^3^ + // Test polymorphism on arg types. Note that order is + // mixed to maximize failure cases + void Foo::publishStuff(char a, char b) // ^4^ { + int foo = a; + int bar = b; + } + + void Foo::sendStuff(int a, int b) // ^3^ + { + int foo = a; + int bar = b; + + Foo::publishStuff(1,2) + } } // namespace Name2 @@ -163,3 +178,37 @@ namespace d { } // namespace f } // namespace d + +// Fully qualified const struct function arguments +class ContainsStruct +{ + struct TheStruct + { + int memberOne; + int memberTwo; + }; +}; + +void someFunc(const struct ContainsStruct::TheStruct *foo) +{ + foo->// -9- + // #9# ("memberOne" "memberTwo") +} + +// Class with structure tag +class ContainsNamedStruct +{ + struct _fooStruct + { + int memberOne; + int memberTwo; + } member; +}; + +void someOtherFunc(void) +{ + ContainsNamedStruct *someClass; + // This has to find ContainsNamedStruct::_fooStruct + someClass->member.// -10- + // #10# ("memberOne" "memberTwo") +} diff --git a/test/manual/cedet/tests/testdoublens.hpp b/test/manual/cedet/tests/testdoublens.hpp index 507c8342b4c..907c4cbffc2 100644 --- a/test/manual/cedet/tests/testdoublens.hpp +++ b/test/manual/cedet/tests/testdoublens.hpp @@ -31,7 +31,9 @@ namespace Name1 { int get(); private: - void publishStuff(int a, int b); + void publishStuff(char /* a */, char /* b */); + + void publishStuff(int q, int r); // Purposely different names. void sendStuff(int a, int b); @@ -58,7 +60,7 @@ namespace a { class Foo { struct Dum { - int diDum; + int diDum; }; protected: