diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/SemaCXX/array-bounds.cpp (renamed from test/Sema/array-bounds.c) | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Sema/array-bounds.c b/test/SemaCXX/array-bounds.cpp index b9dbe6344a..d60600fd4b 100644 --- a/test/Sema/array-bounds.c +++ b/test/SemaCXX/array-bounds.cpp @@ -14,3 +14,8 @@ int foo() { x[sizeof(x[2])]; // expected-warning{{array index of '4' indexes past the end of an array (that contains 2 elements)}} } +// This code example tests that -Warray-bounds works with arrays that +// are template parameters. +template <char *sz> class Qux { + bool test() { return sz[0] == 'a'; } +};
\ No newline at end of file |