parameter pack is a converting constructor. Fixes PR13003.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158040
91177308-0d34-0410-b5e6-
96231b3b80d8
return (getNumParams() == 0 &&
getType()->getAs<FunctionProtoType>()->isVariadic()) ||
(getNumParams() == 1) ||
- (getNumParams() > 1 && getParamDecl(1)->hasDefaultArg());
+ (getNumParams() > 1 &&
+ (getParamDecl(1)->hasDefaultArg() ||
+ getParamDecl(1)->isParameterPack()));
}
bool CXXConstructorDecl::isSpecializationCopyingObject() const {
--- /dev/null
+// RUN: %clang_cc1 -std=c++11 %s -verify
+
+namespace PR13003 {
+ struct void_type
+ {
+ template <typename Arg0, typename... Args>
+ void_type(Arg0&&, Args&&...) { }
+ };
+
+ struct void_type2
+ {
+ template <typename... Args>
+ void_type2(Args&&...) { }
+ };
+
+ struct atom { };
+
+ void_type v1 = atom();
+ void_type2 v2 = atom();
+}
+