Implement C++ copy-initialization for declarations. There is now some
duplication in the handling of copy-initialization by constructor,
which occurs both for initialization of a declaration and for
overloading. The initialization code is due for some refactoring.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58756 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp
index 9f20ac8..f49b207 100644
--- a/lib/AST/DeclCXX.cpp
+++ b/lib/AST/DeclCXX.cpp
@@ -158,7 +158,7 @@
   //     A default constructor for a class X is a constructor of class
   //     X that can be called without an argument.
   return (getNumParams() == 0) ||
-         (getNumParams() > 0 & getParamDecl(1)->getDefaultArg() != 0);
+         (getNumParams() > 0 && getParamDecl(0)->getDefaultArg() != 0);
 }
 
 bool