diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2009-12-29 08:05:19 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2009-12-29 08:05:19 +0000 |
commit | 595e290bcb69af7ea053fe43f87701ee761d68d3 (patch) | |
tree | c1eaed73dbf7b11ae5add2cff86062e9d2cd3c33 /test/SemaCXX/const-cast.cpp | |
parent | 1280708c17d373762ea4110b4f989d6c7239f6fb (diff) |
Fix support for const_cast<>s of array types which actual change the
CV-qualifiers. Remove an error expectation from the 'good' set of const-cast
test cases. With this patch, the final non-template test case from PR5542
passes. (It's the same as the one already in const-cast.cpp.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92257 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/const-cast.cpp')
-rw-r--r-- | test/SemaCXX/const-cast.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/SemaCXX/const-cast.cpp b/test/SemaCXX/const-cast.cpp index 74a67e5647..220e6faeee 100644 --- a/test/SemaCXX/const-cast.cpp +++ b/test/SemaCXX/const-cast.cpp @@ -28,8 +28,9 @@ char ***good_const_cast_test(ccvpcvpp var) char ***&var4 = const_cast<cpppr>(var3); // Drop reference. Intentionally without qualifier change. char *** var5 = const_cast<cppp>(var4); + // Const array to array reference. const int ar[100] = {0}; - int (&rar)[100] = const_cast<iarr>(ar); // expected-error {{const_cast from 'int const [100]' to 'iarr' (aka 'iar &') is not allowed}} + int (&rar)[100] = const_cast<iarr>(ar); // Array decay. Intentionally without qualifier change. int *pi = const_cast<int*>(ar); f fp = 0; |