blob: 8b595237fcab7addc79998745012834ccd8fcc37 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -fsyntax-only -verify
2// RUN: %clang_cc1 -triple i686-unknown-unknown %s -fsyntax-only -verify
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00003// expected-no-diagnostics
Anders Carlsson1cca74e2009-05-17 02:06:04 +00004#include <stddef.h>
5
6struct A;
7
8void f() {
9 int A::*dataMember;
10
11 int (A::*memberFunction)();
12
13 typedef int assert1[sizeof(dataMember) == sizeof(ptrdiff_t) ? 1 : -1];
14 typedef int assert2[sizeof(memberFunction) == sizeof(ptrdiff_t) * 2 ? 1 : -1];
15}
16