diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2009-12-30 04:10:01 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2009-12-30 04:10:01 +0000 |
commit | e724246b9f655801bd96b727daf9dddc44beef4d (patch) | |
tree | a9846317ea68879c10eac9b6137c5a7759b3956a /test/SemaTemplate/deduction.cpp | |
parent | beb80194298097ef8680136d28e96a9326df90ac (diff) | |
download | clang-e724246b9f655801bd96b727daf9dddc44beef4d.tar.gz clang-e724246b9f655801bd96b727daf9dddc44beef4d.tar.bz2 clang-e724246b9f655801bd96b727daf9dddc44beef4d.tar.xz |
More fixes to the handling of CVR-comparisons on array types. Adds a method to
QualType to get CVR-qualifiers through array types, and switches the primary
comparison methods to use it. This may allow simplifying some of the callers of
getUnqualifiedArrayType.
Also fix the normalizing of CV-qualification during template deduction to
normalize through arrays and allow a more qualified deduced array type. This
fixes PR5911.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92289 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/deduction.cpp')
-rw-r--r-- | test/SemaTemplate/deduction.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaTemplate/deduction.cpp b/test/SemaTemplate/deduction.cpp index 887535b92d..375d199f58 100644 --- a/test/SemaTemplate/deduction.cpp +++ b/test/SemaTemplate/deduction.cpp @@ -81,3 +81,8 @@ int array1[is_same<Replace<const _1, int, float>::type, const int>::value? 1 : - int array2[is_same<Replace<vector<_1>, int, float>::type, vector<int> >::value? 1 : -1]; int array3[is_same<Replace<vector<const _1>, int, float>::type, vector<const int> >::value? 1 : -1]; int array4[is_same<Replace<vector<int, _2>, double, float>::type, vector<int, float> >::value? 1 : -1]; + +// PR5911 +template <typename T, int N> void f(const T (&a)[N]); +int iarr[] = { 1 }; +void test_PR5911() { f(iarr); } |