aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-expr-4.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-01-04 04:44:35 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-01-04 04:44:35 +0000
commitb2b5cc0cf908d516a107d373db963f692449a8a8 (patch)
tree097ae3873914902bca3bb2c785b3121eaafaae57 /test/SemaTemplate/instantiate-expr-4.cpp
parentb95cc97b2023d00cd3fbae8455bc9d728eab5e5d (diff)
Enhance the diagnostic for negative array sizes to include the
declaration name of the array when present. This ensures that a poor-man's C++03 static_assert will include the user error message often embedded in the name. Update all the tests to reflect the new wording, and add a test for the name behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122802 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/instantiate-expr-4.cpp')
-rw-r--r--test/SemaTemplate/instantiate-expr-4.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/SemaTemplate/instantiate-expr-4.cpp b/test/SemaTemplate/instantiate-expr-4.cpp
index 11efe5b7f3..d923f2b555 100644
--- a/test/SemaTemplate/instantiate-expr-4.cpp
+++ b/test/SemaTemplate/instantiate-expr-4.cpp
@@ -46,8 +46,8 @@ template struct Temporaries0<5, 7>;
// Ensure that both the constructor and the destructor are instantiated by
// checking for parse errors from each.
template<int N> struct BadX {
- BadX() { int a[-N]; } // expected-error {{array size is negative}}
- ~BadX() { int a[-N]; } // expected-error {{array size is negative}}
+ BadX() { int a[-N]; } // expected-error {{array with a negative size}}
+ ~BadX() { int a[-N]; } // expected-error {{array with a negative size}}
};
template<int N>