Kill off RequiresGlobalConstructor in favor of isConstantInitializer.
Note some obvious false positives in the test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109986 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/warn-global-constructors.cpp b/test/SemaCXX/warn-global-constructors.cpp
index 6d0709c..c407e40 100644
--- a/test/SemaCXX/warn-global-constructors.cpp
+++ b/test/SemaCXX/warn-global-constructors.cpp
@@ -29,6 +29,11 @@
A a; // expected-warning {{global constructor}}
A b[10]; // expected-warning {{global constructor}}
A c[10][10]; // expected-warning {{global constructor}}
+
+ // FIXME: false positives!
+ A &d = a; // expected-warning {{global constructor}}
+ A &e = b[5]; // expected-warning {{global constructor}}
+ A &f = c[5][7]; // expected-warning {{global constructor}}
}
namespace test3 {
@@ -36,4 +41,15 @@
A a; // expected-warning {{global destructor}}
A b[10]; // expected-warning {{global destructor}}
A c[10][10]; // expected-warning {{global destructor}}
+
+ // FIXME: false positives!
+ A &d = a; // expected-warning {{global constructor}}
+ A &e = b[5]; // expected-warning {{global constructor}}
+ A &f = c[5][7]; // expected-warning {{global constructor}}
+}
+
+namespace test4 {
+ char a[] = "hello";
+ char b[5] = "hello";
+ char c[][5] = { "hello" };
}