diff --git a/lib/Differentiator/DerivativeBuilder.cpp b/lib/Differentiator/DerivativeBuilder.cpp index cda7d886d..77a1377c4 100644 --- a/lib/Differentiator/DerivativeBuilder.cpp +++ b/lib/Differentiator/DerivativeBuilder.cpp @@ -92,7 +92,7 @@ namespace clad { } DeclWithContext DerivativeBuilder::cloneFunction( - const clang::FunctionDecl* FD, clad::VisitorBase& VB, + const clang::FunctionDecl* FD, clad::VisitorBase& VD, clang::DeclContext* DC, clang::Sema& m_Sema, clang::ASTContext& m_Context, clang::SourceLocation& noLoc, clang::DeclarationNameInfo name, clang::QualType functionType) { @@ -114,7 +114,7 @@ namespace clad { returnedFD->setAccess(FD->getAccess()); } else { assert (isa(FD) && "Unexpected!"); - enclosingNS = VB.RebuildEnclosingNamespaces(DC); + enclosingNS = VD.RebuildEnclosingNamespaces(DC); returnedFD = FunctionDecl::Create(m_Context, m_Sema.CurContext, noLoc,