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 | 585fb1e97ea4dc67a45f304a42368f8d6b555a52 (patch) | |
| tree | 801993ca5ea7a60b0d0726b71d2db5956379ccb6 /clang/test | |
| parent | 6311212bf9c5d908950b0c57b4ad647617f1ec36 (diff) | |
| download | bcm5719-llvm-585fb1e97ea4dc67a45f304a42368f8d6b555a52.tar.gz bcm5719-llvm-585fb1e97ea4dc67a45f304a42368f8d6b555a52.zip | |
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.)
llvm-svn: 92257
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaCXX/const-cast.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/const-cast.cpp b/clang/test/SemaCXX/const-cast.cpp index 74a67e56479..220e6faeee3 100644 --- a/clang/test/SemaCXX/const-cast.cpp +++ b/clang/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; |

