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 |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 3 | // expected-no-diagnostics |
Anders Carlsson | 1cca74e | 2009-05-17 02:06:04 +0000 | [diff] [blame] | 4 | #include <stddef.h> |
| 5 | |
| 6 | struct A; |
| 7 | |
| 8 | void 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 | |