commit | a7fa2aa49c075fe5fc82f37fc4ff447be0a492bb | [log] [tgz] |
---|---|---|
author | Anders Carlsson <andersca@mac.com> | Mon Nov 24 05:23:59 2008 +0000 |
committer | Anders Carlsson <andersca@mac.com> | Mon Nov 24 05:23:59 2008 +0000 |
tree | 4efe26826e5fe969dabb5a6ff38f5f955a5c0d73 | |
parent | 9c2ea3785c93cc1289735cc4ce855df7e832afa7 [diff] |
Reimplement Expr::isConstantExpr in terms of Expr::Evaluate. This fixes PR2832. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59946 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/staticinit.c b/test/CodeGen/staticinit.c index 50c837a..196d931 100644 --- a/test/CodeGen/staticinit.c +++ b/test/CodeGen/staticinit.c
@@ -18,3 +18,9 @@ static char a[10]; static char *b = a; } + +struct s { void *p; }; + +void foo(void) { + static struct s var = {((void*)&((char*)0)[0])}; +}