diff options
Diffstat (limited to 'clang/test/SemaCXX/static-initializers.cpp')
-rw-r--r-- | clang/test/SemaCXX/static-initializers.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/static-initializers.cpp b/clang/test/SemaCXX/static-initializers.cpp new file mode 100644 index 0000000..ca49fce --- /dev/null +++ b/clang/test/SemaCXX/static-initializers.cpp @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +int f() { + return 10; +} + +void g() { + static int a = f(); +} + +static int b = f(); |