Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, since the context is available in the Decl
llvm-svn: 91862
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp
index 0237a32..edc899e 100644
--- a/clang/lib/CodeGen/CGCXX.cpp
+++ b/clang/lib/CodeGen/CGCXX.cpp
@@ -508,7 +508,7 @@
llvm::Value *This,
CallExpr::const_arg_iterator ArgBeg,
CallExpr::const_arg_iterator ArgEnd) {
- if (D->isCopyConstructor(getContext())) {
+ if (D->isCopyConstructor()) {
const CXXRecordDecl *ClassDecl = cast<CXXRecordDecl>(D->getDeclContext());
if (ClassDecl->hasTrivialCopyConstructor()) {
assert(!ClassDecl->hasUserDeclaredCopyConstructor() &&
@@ -564,7 +564,7 @@
getContext().getAsConstantArrayType(E->getType());
// For a copy constructor, even if it is trivial, must fall thru so
// its argument is code-gen'ed.
- if (!CD->isCopyConstructor(getContext())) {
+ if (!CD->isCopyConstructor()) {
QualType InitType = E->getType();
if (Array)
InitType = getContext().getBaseElementType(Array);
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 28df9e4..f904f04 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -331,7 +331,7 @@
if (const CXXConstructorDecl *CD = dyn_cast<CXXConstructorDecl>(FD)) {
// FIXME: For C++0x, we want to look for implicit *definitions* of
// these special member functions, rather than implicit *declarations*.
- if (CD->isCopyConstructor(getContext())) {
+ if (CD->isCopyConstructor()) {
assert(!ClassDecl->hasUserDeclaredCopyConstructor() &&
"Cannot synthesize a non-implicit copy constructor");
SynthesizeCXXCopyConstructor(CD, GD.getCtorType(), Fn, Args);