diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2009-12-29 07:16:59 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2009-12-29 07:16:59 +0000 |
commit | 607f38e05fac37a6a4972199eb646d8f1d2ff878 (patch) | |
tree | a1b2432f29f5df3103b97dd91af686573fb31aa8 /clang/test/SemaCXX/qualification-conversion.cpp | |
parent | 5d3b07711118b241a827c4d07a123337331db3d7 (diff) | |
download | bcm5719-llvm-607f38e05fac37a6a4972199eb646d8f1d2ff878.tar.gz bcm5719-llvm-607f38e05fac37a6a4972199eb646d8f1d2ff878.zip |
Correctly refer to element CVR qualifications when determining if a type is
more or less cv-qualified than another during implicit conversion and overload
resolution ([basic.type.qualifier] p5). Factors the logic out of template
deduction and into the ASTContext so it can be shared.
This fixes several aspects of PR5542, but not all of them.
llvm-svn: 92248
Diffstat (limited to 'clang/test/SemaCXX/qualification-conversion.cpp')
-rw-r--r-- | clang/test/SemaCXX/qualification-conversion.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/qualification-conversion.cpp b/clang/test/SemaCXX/qualification-conversion.cpp index cb9bbbd986e..f1af5bf2852 100644 --- a/clang/test/SemaCXX/qualification-conversion.cpp +++ b/clang/test/SemaCXX/qualification-conversion.cpp @@ -21,3 +21,14 @@ void test_mquals(int A::*p, int A::* A::*pp, int A::* A::* A::*ppp) { mquals2(pp); mquals3(ppp); // expected-error {{no matching}} } + +void aquals1(int const (*p)[1]); +void aquals2(int * const (*pp)[1]); +void aquals2a(int const * (*pp2)[1]); // expected-note{{candidate function}} + +void test_aquals(int (*p)[1], int * (*pp)[1], int * (*pp2)[1]) { + int const (*p2)[1] = p; + aquals1(p); + aquals2(pp); + aquals2a(pp2); // expected-error {{no matching}} +} |