summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-02-21 05:45:29 +0000
committerChris Lattner <sabre@nondot.org>2008-02-21 05:45:29 +0000
commit3b418d8446458c82d77fe35fb3824c5acc752e09 (patch)
tree3e62c6e47ad774d629249b634328f0c8cfc77bf9 /clang/test
parent4da4f85090280d794a75332b096f1bea82dd0255 (diff)
downloadbcm5719-llvm-3b418d8446458c82d77fe35fb3824c5acc752e09.tar.gz
bcm5719-llvm-3b418d8446458c82d77fe35fb3824c5acc752e09.zip
implement codegen support for sizeof(void), fixing PR2080.
llvm-svn: 47429
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGen/exprs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGen/exprs.c b/clang/test/CodeGen/exprs.c
index 16b63f8883b..b4384ee0c2a 100644
--- a/clang/test/CodeGen/exprs.c
+++ b/clang/test/CodeGen/exprs.c
@@ -23,3 +23,14 @@ int test3() {
bp -= (short)1;
}
+// PR2080 - sizeof void
+int t1 = sizeof(void);
+int t2 = __alignof__(void);
+void test4() {
+ t1 = sizeof(void);
+ t2 = __alignof__(void);
+
+ t1 = sizeof(test4());
+ t2 = __alignof__(test4());
+}
+
OpenPOWER on IntegriCloud