diff options
Diffstat (limited to 'test/SemaCXX/warn-global-constructors.cpp')
-rw-r--r-- | test/SemaCXX/warn-global-constructors.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/SemaCXX/warn-global-constructors.cpp b/test/SemaCXX/warn-global-constructors.cpp index 0391f5ba3d..ad609545ec 100644 --- a/test/SemaCXX/warn-global-constructors.cpp +++ b/test/SemaCXX/warn-global-constructors.cpp @@ -72,7 +72,7 @@ namespace test6 { struct A { ~A(); }; void f1() { - static A a; // expected-warning {{global destructor}} + static A a; } void f2() { static A& a = *new A; @@ -84,8 +84,14 @@ namespace pr8095 { int x; Foo(int x1) : x(x1) {} }; + void foo() { + static Foo a(0); + } + struct Bar { + ~Bar(); + }; void bar() { - static Foo a(0); + static Bar b; } } |