diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-14 00:27:16 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-14 00:27:16 +0000 |
commit | 3bde7bf3e00747228a17ac4501cf9eeeb84b434a (patch) | |
tree | 4214ffa640444c81f1b6f01a8704676b01d98dc0 /clang/test | |
parent | d64455cd431bce37d15acca4e2de2829180fe12c (diff) | |
download | bcm5719-llvm-3bde7bf3e00747228a17ac4501cf9eeeb84b434a.tar.gz bcm5719-llvm-3bde7bf3e00747228a17ac4501cf9eeeb84b434a.zip |
PR41817: Fix regression in r359260 that caused the MS compatibility
extension allowing a "static" declaration to follow an "extern"
declaration to stop working.
llvm-svn: 360637
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGen/ms-compat-extern-static.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGen/ms-compat-extern-static.c b/clang/test/CodeGen/ms-compat-extern-static.c new file mode 100644 index 00000000000..2ad60ef7bc9 --- /dev/null +++ b/clang/test/CodeGen/ms-compat-extern-static.c @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -emit-llvm %s -o - -fms-extensions -triple x86_64-windows | FileCheck %s + +// CHECK: @n = internal global i32 1 +extern int n; +static int n = 1; +int *use = &n; + +// CHECK: define internal void @f( +extern void f(); +static void f() {} +void g() { return f(); } |