Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -fsyntax-only -verify |
| 2 | // RUN: %clang_cc1 -triple i686-unknown-unknown %s -fsyntax-only -verify |
Anders Carlsson | 1cca74e | 2009-05-17 02:06:04 +0000 | [diff] [blame] | 3 | #include <stddef.h> |
| 4 | |
| 5 | struct A; |
| 6 | |
| 7 | void f() { |
| 8 | int A::*dataMember; |
| 9 | |
| 10 | int (A::*memberFunction)(); |
| 11 | |
| 12 | typedef int assert1[sizeof(dataMember) == sizeof(ptrdiff_t) ? 1 : -1]; |
| 13 | typedef int assert2[sizeof(memberFunction) == sizeof(ptrdiff_t) * 2 ? 1 : -1]; |
| 14 | } |
| 15 | |