From c72c57c9e9b69944e3e009cd5e209634839581d3 Mon Sep 17 00:00:00 2001 From: dim Date: Mon, 8 Apr 2013 18:45:10 +0000 Subject: Vendor import of clang trunk r178860: http://llvm.org/svn/llvm-project/cfe/trunk@178860 --- test/Sema/inline.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/Sema/inline.c') diff --git a/test/Sema/inline.c b/test/Sema/inline.c index c27c00e..496e282 100644 --- a/test/Sema/inline.c +++ b/test/Sema/inline.c @@ -73,6 +73,16 @@ inline int useStaticAgain () { // expected-note 2 {{use 'static' to give inline #pragma clang diagnostic pop +inline void defineStaticVar() { // expected-note {{use 'static' to give inline function 'defineStaticVar' internal linkage}} + static const int x = 0; // ok + static int y = 0; // expected-warning {{non-constant static local variable in inline function may be different in different files}} +} + +extern inline void defineStaticVarInExtern() { + static const int x = 0; // ok + static int y = 0; // ok +} + #endif -- cgit v1.1