diff options
author | Anders Carlsson <andersca@mac.com> | 2007-10-17 00:52:43 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2007-10-17 00:52:43 +0000 |
commit | 1a86b33c1870fee08d281c9f07ac1280195a7fae (patch) | |
tree | bc8758a3130764e9274f8efeb214e111253b83f7 /test/Sema/static-init.c | |
parent | adc9b13208a628c525fe075afb06bca518810777 (diff) |
Generate code for static variables that don't have initializers. Also, report an error if a static initializer is not constant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43058 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/static-init.c')
-rw-r--r-- | test/Sema/static-init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Sema/static-init.c b/test/Sema/static-init.c new file mode 100644 index 0000000000..e710973700 --- /dev/null +++ b/test/Sema/static-init.c @@ -0,0 +1,3 @@ +// RUN: clang -fsyntax-only -verify %s +static int f = 10; +static int b = f; // expected-error {{initializer element is not constant}} |