From 47791a405168b9321f3ef49b3b3957dab4cf11ea Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 13 Nov 2007 20:50:37 +0000 Subject: Parse "sizeof(arr)[0]" as a sizeof of an expr if arr is an expression. llvm-svn: 44065 --- clang/test/Parser/expressions.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'clang/test/Parser/expressions.c') diff --git a/clang/test/Parser/expressions.c b/clang/test/Parser/expressions.c index 3fb8c1c89df..3b47260c32f 100644 --- a/clang/test/Parser/expressions.c +++ b/clang/test/Parser/expressions.c @@ -28,3 +28,12 @@ int test_offsetof() { // FIXME: change into something that is semantically correct. __builtin_offsetof(int, a.b.c[4][5]); } + +void test_sizeof(){ + int arr[10]; + sizeof arr[0]; + sizeof(arr[0]); + sizeof(arr)[0]; +} + + -- cgit v1.2.3