aboutsummaryrefslogtreecommitdiffstats
path: root/tests/static-pmf/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/static-pmf/main.cpp')
-rw-r--r--tests/static-pmf/main.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/static-pmf/main.cpp b/tests/static-pmf/main.cpp
new file mode 100644
index 00000000..4051c636
--- /dev/null
+++ b/tests/static-pmf/main.cpp
@@ -0,0 +1,12 @@
+#include <QtCore/QObject>
+
+struct NonQObject {
+ void method() {}
+};
+
+void test()
+{
+ static auto f = &QObject::destroyed; // Warn
+ auto f2 = &QObject::destroyed; // OK
+ static auto f4 = &NonQObject::method; // OK
+}