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 | f94cd1ffe657bb423984768fb03ed75141449196 (patch) | |
tree | 69c9b9c44304f6a36359586a6089b6039e709a50 /clang/test/Sema/static-init.c | |
parent | 86edafc6d6015051ef446937bade8b5d48bbd958 (diff) | |
download | bcm5719-llvm-f94cd1ffe657bb423984768fb03ed75141449196.tar.gz bcm5719-llvm-f94cd1ffe657bb423984768fb03ed75141449196.zip |
Generate code for static variables that don't have initializers. Also, report an error if a static initializer is not constant.
llvm-svn: 43058
Diffstat (limited to 'clang/test/Sema/static-init.c')
-rw-r--r-- | clang/test/Sema/static-init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Sema/static-init.c b/clang/test/Sema/static-init.c new file mode 100644 index 00000000000..e710973700a --- /dev/null +++ b/clang/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}} |