diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-01-24 04:51:48 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-01-24 04:51:48 +0000 |
commit | 0f2ae789807d8a936723d4fb5f9234fbec240ada (patch) | |
tree | 782202cd7fc2537a3187831d9461c40184661944 /clang/test/SemaCXX/array-bounds.cpp | |
parent | c46534a0cd68f6f2593bcdee9bcc952c7ff7f9bf (diff) | |
download | bcm5719-llvm-0f2ae789807d8a936723d4fb5f9234fbec240ada.tar.gz bcm5719-llvm-0f2ae789807d8a936723d4fb5f9234fbec240ada.zip |
Revert various template unreachability code I committed accidentally.
r148774, r148775, r148776, r148777
llvm-svn: 148780
Diffstat (limited to 'clang/test/SemaCXX/array-bounds.cpp')
-rw-r--r-- | clang/test/SemaCXX/array-bounds.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/test/SemaCXX/array-bounds.cpp b/clang/test/SemaCXX/array-bounds.cpp index 8d0b1e4e30b..c1b37011727 100644 --- a/clang/test/SemaCXX/array-bounds.cpp +++ b/clang/test/SemaCXX/array-bounds.cpp @@ -73,21 +73,17 @@ void test() { (*array_ptr)[3] = 1; // expected-warning {{array index 3 is past the end of the array (which contains 2 elements)}} } -// FIXME: we should see the next note only 3 times and the following warning once, not twice -// since it is independent of the template parameter 'I'. template <int I> struct S { - char arr[I]; // expected-note 4 {{declared here}} + char arr[I]; // expected-note 2 {{declared here}} }; template <int I> void f() { S<3> s; - s.arr[4] = 0; // expected-warning 2 {{array index 4 is past the end of the array (which contains 3 elements)}} - s.arr[I] = 0; // expected-warning {{array index 5 is past the end of the array (which contains 3 elements)}} \ - expected-warning {{array index 3 is past the end of the array (which contains 3 elements)}} + s.arr[4] = 0; // expected-warning {{array index 4 is past the end of the array (which contains 3 elements)}} + s.arr[I] = 0; // expected-warning {{array index 5 is past the end of the array (which contains 3 elements)}} } void test_templates() { f<5>(); // expected-note {{in instantiation}} - f<3>(); // expected-note {{in instantiation}} } #define SIZE 10 |