diff options
author | John McCall <rjmccall@apple.com> | 2010-08-01 21:51:45 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-01 21:51:45 +0000 |
commit | b4b9b15c597a923a03ad0a33cdc49b67e5cc4450 (patch) | |
tree | 953044712bdb5e7d65a55208989e9be5e2823579 /test/SemaCXX/warn-global-constructors.cpp | |
parent | 626e96e2874698a6736fd33672fa9c28da91d77e (diff) |
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
Diffstat (limited to 'test/SemaCXX/warn-global-constructors.cpp')
-rw-r--r-- | test/SemaCXX/warn-global-constructors.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-global-constructors.cpp b/test/SemaCXX/warn-global-constructors.cpp index 6d0709c5b7..c407e407bb 100644 --- a/test/SemaCXX/warn-global-constructors.cpp +++ b/test/SemaCXX/warn-global-constructors.cpp @@ -29,6 +29,11 @@ namespace test2 { 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 @@ namespace test3 { 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" }; } |