Improve template argument deduction for array types, so that a parameter
const T
can be matched with, e.g.,
volatile int [5]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76773 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp
index b58422b..a75a858 100644
--- a/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/lib/Sema/SemaTemplateInstantiate.cpp
@@ -758,6 +758,7 @@
// which case the cv-qualifiers are ignored.
//
// The same rule applies to function types.
+ // FIXME: what about address-space and Objective-C GC qualifiers?
if (!Result.isNull() && T.getCVRQualifiers() &&
!Result->isFunctionType() && !Result->isReferenceType())
Result = Result.getWithAdditionalQualifiers(T.getCVRQualifiers());