De-ASTContext-ify DeclContext.
Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74506 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index cd985c5..e2f6d33 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -2498,7 +2498,7 @@
// Add the specialization into its lexical context, so that it can
// be seen when iterating through the list of declarations in that
// context. However, specializations are not found by name lookup.
- CurContext->addDecl(Context, Specialization);
+ CurContext->addDecl(Specialization);
return DeclPtrTy::make(Specialization);
}
@@ -2654,7 +2654,7 @@
ClassTemplate,
Converted, 0);
Specialization->setLexicalDeclContext(CurContext);
- CurContext->addDecl(Context, Specialization);
+ CurContext->addDecl(Specialization);
return DeclPtrTy::make(Specialization);
}
@@ -2703,7 +2703,7 @@
// since explicit instantiations are never found by name lookup, we
// just put it into the declaration context directly.
Specialization->setLexicalDeclContext(CurContext);
- CurContext->addDecl(Context, Specialization);
+ CurContext->addDecl(Specialization);
// C++ [temp.explicit]p3:
// A definition of a class template or class member template