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
} // 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")
+}
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);
class Foo
{
struct Dum {
- int diDum;
+ int diDum;
};
protected: