diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-01-04 04:44:35 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-01-04 04:44:35 +0000 |
commit | a92409c3ec845ed39459d5d6f93e9d328fe477d4 (patch) | |
tree | faf0082927d023cebf3f2338c5d09265463729d6 /clang/test/SemaTemplate/instantiate-default-assignment-operator.cpp | |
parent | f4e13699e7e8db87f2787ba56b16336921f1b608 (diff) | |
download | bcm5719-llvm-a92409c3ec845ed39459d5d6f93e9d328fe477d4.tar.gz bcm5719-llvm-a92409c3ec845ed39459d5d6f93e9d328fe477d4.zip |
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.
llvm-svn: 122802
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-default-assignment-operator.cpp')
-rw-r--r-- | clang/test/SemaTemplate/instantiate-default-assignment-operator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaTemplate/instantiate-default-assignment-operator.cpp b/clang/test/SemaTemplate/instantiate-default-assignment-operator.cpp index 8b97f59e87e..31cdef59d9f 100644 --- a/clang/test/SemaTemplate/instantiate-default-assignment-operator.cpp +++ b/clang/test/SemaTemplate/instantiate-default-assignment-operator.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s template<typename> struct PassRefPtr { }; template<typename T> struct RefPtr { - RefPtr& operator=(const RefPtr&) { int a[sizeof(T) ? -1 : -1];} // expected-error 2 {{array size is negative}} + RefPtr& operator=(const RefPtr&) { int a[sizeof(T) ? -1 : -1];} // expected-error 2 {{array with a negative size}} RefPtr& operator=(const PassRefPtr<T>&); }; |